diff --git a/README.md b/README.md index 53241a4..0670c0b 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,15 @@ Quick search that grabs relevant information about a movie ``` this will let you choose which scripts to install +* Install all the scripts +```bash +./install.sh all +``` + +* Install an individual script +```bash +./install.sh stocks +``` ## Uninstalling * If you don't have the Bash-Snippets folder anymore clone the repository: ```git clone https://github.com/alexanderepstein/Bash-Snippets``` diff --git a/install.sh b/install.sh index 9df2e80..2a55e1f 100755 --- a/install.sh +++ b/install.sh @@ -74,6 +74,49 @@ elif [[ $1 == "movies" ]]; then cd movies || exit 1 ./install.sh || exit 1 cd .. || exit 1 +elif [[ $1 == "all" ]];then + cd currency || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + cd stocks || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + cd weather || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + cd crypt || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + cd movies || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 +elif [[ $1 == "update" ]]; then + echo "Updating scripts..." + if [[ -f /usr/local/bin/currency ]];then + cd currency || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + fi + if [[ -f /usr/local/bin/stocks ]];then + cd stocks || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + fi + if [[ -f /usr/local/bin/weather ]];then + cd weather || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + fi + if [[ -f /usr/local/bin/crypt ]];then + cd crypt || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + fi + if [[ -f /usr/local/bin/movies ]];then + cd movies || exit 1 + ./install.sh || exit 1 + cd .. || exit 1 + fi fi echo "Bash Snippets version $currentVersion"