diff --git a/main_install.sh b/main_install.sh index e5bae1f..807bde6 100755 --- a/main_install.sh +++ b/main_install.sh @@ -150,8 +150,6 @@ separator # }}} -exit - # Configure Git {{{ echo "Configuring Git..." @@ -170,8 +168,11 @@ separator echo "Installing Rust..." if rustc --version; then - echo "${GREEN}Rust is already intalled. Updading...${NC}" - rustup update + echo "${GREEN}Rust is already intalled${NC}" + if [ "$UPDATE" = 'true' ]; then + echo "Updading..." + rustup update + fi else if curl https://sh.rustup.rs -sSf | sh; then echo "${GREEN}Successfully installed Rust${NC}" @@ -187,11 +188,13 @@ separator # Clone bash-git-prompt {{{ if [ -e ~/.bash-git-prompt ]; then - echo "Found existing bash-git-prompt, updating..." - cd ~/.bash-git-prompt && git pull - cd "$base_dir" || exit 1 + echo "${GREEN}Found existing bash-git-prompt.${NC}" + if [ "$UPDATE" = 'true' ]; then + echo "Updating..." + cd ~/.bash-git-prompt && git pull + fi else - echo "Cloning bash-git-prompt..." + echo "${ORANGE}Cloning bash-git-prompt...${NC}" git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1 fi @@ -204,16 +207,17 @@ separator echo "Adding MIME type for .md files in Firefox..." echo "${ORANGE}Remember to install the Firefox extension for it to work${NC}" -if [ -e ~/.local/share/mime/packages/text-markdown.xml ]; then +mkdir -p ~/.local/share/mime/packages echo " - + " > ~/.local/share/mime/packages/text-markdown.xml -fi + +update-mime-database ~/.local/share/mime separator @@ -223,7 +227,7 @@ separator echo "Cloning projects..." -/bin/bash clone_projects.sh +/bin/bash "$BASE_DIR"/installation_scripts/clone_projects.sh separator