Skip to content

Commit

Permalink
Added a y/n user confirmation for cloning/updating/running the client
Browse files Browse the repository at this point in the history
  • Loading branch information
sfaber34 committed Nov 5, 2024
1 parent 3192ab7 commit 51eaf6a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 26 deletions.
37 changes: 24 additions & 13 deletions packages/nextjs/public/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,30 @@ if [ "$os_name" = "Darwin" ]; then
fi

if [ ! -d "$HOME/buidlguidl-client" ]; then
echo -e "\n🚀 Cloning buidlguidl-client repo"
cd ~
git clone https://github.com/BuidlGuidl/buidlguidl-client.git
cd buidlguidl-client
git checkout main
yarn install
echo -e "\n"
read -r -p "❓ Do you want to clone and run the buidlguidl-client repo? [y/n] " response
if [[ "$response" =~ ^[Yy]$ ]]; then
echo -e "\n🚀 Cloning buidlguidl-client repo"
cd ~
git clone https://github.com/BuidlGuidl/buidlguidl-client.git
cd buidlguidl-client
git checkout main
yarn install
node index.js
else
echo -e "\n👎 BuidlGuidl Client installation canceled.\n"
fi
else
echo -e "\n⌛️ Updating buidlguidl-client repo"
cd "$HOME/buidlguidl-client"
git pull
yarn install
echo -e "\n"
read -r -p "❓ The buidlguidl-client repo is already cloned. Do you want to update and run it? [y/n] " response
if [[ "$response" =~ ^[Yy]$ ]]; then
echo -e "\n⌛️ Updating buidlguidl-client repo"
cd "$HOME/buidlguidl-client"
git pull
yarn install
node index.js
else
echo -e "\n👎 BuidlGuidl Client update canceled.\n"
fi
fi

cd "$HOME/buidlguidl-client"
node index.js

37 changes: 24 additions & 13 deletions packages/nextjs/public/runBuidlGuidlClient.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,30 @@ if [ "$os_name" = "Darwin" ]; then
fi

if [ ! -d "$HOME/buidlguidl-client" ]; then
echo -e "\n🚀 Cloning buidlguidl-client repo"
cd ~
git clone https://github.com/BuidlGuidl/buidlguidl-client.git
cd buidlguidl-client
git checkout main
yarn install
echo -e "\n"
read -r -p "❓ Do you want to clone and run the buidlguidl-client repo? [y/n] " response
if [[ "$response" =~ ^[Yy]$ ]]; then
echo -e "\n🚀 Cloning buidlguidl-client repo"
cd ~
git clone https://github.com/BuidlGuidl/buidlguidl-client.git
cd buidlguidl-client
git checkout main
yarn install
node index.js
else
echo -e "\n👎 BuidlGuidl Client installation canceled.\n"
fi
else
echo -e "\n⌛️ Updating buidlguidl-client repo"
cd "$HOME/buidlguidl-client"
git pull
yarn install
echo -e "\n"
read -r -p "❓ The buidlguidl-client repo is already cloned. Do you want to update and run it? [y/n] " response
if [[ "$response" =~ ^[Yy]$ ]]; then
echo -e "\n⌛️ Updating buidlguidl-client repo"
cd "$HOME/buidlguidl-client"
git pull
yarn install
node index.js
else
echo -e "\n👎 BuidlGuidl Client update canceled.\n"
fi
fi

cd "$HOME/buidlguidl-client"
node index.js

0 comments on commit 51eaf6a

Please sign in to comment.