Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a y/n user confirmation for cloning/updating/running the client #16

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading