make-brew-installer.sh
-minor fix -‘brew install mas’ option
This commit is contained in:
@@ -112,6 +112,17 @@ else
|
|||||||
fi
|
fi
|
||||||
' >> brew-install.sh
|
' >> brew-install.sh
|
||||||
|
|
||||||
|
# test if mas is installed
|
||||||
|
echo '
|
||||||
|
# test if mas is installed' >> brew-install.sh
|
||||||
|
echo '
|
||||||
|
if [[ $(command -v mas) == "" ]]; then
|
||||||
|
brew install mas
|
||||||
|
else
|
||||||
|
echo "mas already installed"
|
||||||
|
fi
|
||||||
|
' >> brew-install.sh
|
||||||
|
|
||||||
if [[ "$brew" -eq 1 ]] || [[ "$casks" -eq 1 ]] || [[ "$mas" -eq 1 ]]; then
|
if [[ "$brew" -eq 1 ]] || [[ "$casks" -eq 1 ]] || [[ "$mas" -eq 1 ]]; then
|
||||||
echo -e "\n# Brew tap list.\n" >> brew-install.sh
|
echo -e "\n# Brew tap list.\n" >> brew-install.sh
|
||||||
echo -e "🍺 Get Homebrew \033[3m\033[93mtap\033[0m list"
|
echo -e "🍺 Get Homebrew \033[3m\033[93mtap\033[0m list"
|
||||||
@@ -135,14 +146,14 @@ if [ "$mas" -eq 1 ]; then
|
|||||||
echo -e "\n# Mac App Store applications list.\n" >> brew-install.sh
|
echo -e "\n# Mac App Store applications list.\n" >> brew-install.sh
|
||||||
echo -e "🍏 Get Mac App Store \033[3m\033[93mapplications\033[0m list"
|
echo -e "🍏 Get Mac App Store \033[3m\033[93mapplications\033[0m list"
|
||||||
#mas list | awk '{print $1}' | sed -e 's/^/mas install /' >> brew-install.sh
|
#mas list | awk '{print $1}' | sed -e 's/^/mas install /' >> brew-install.sh
|
||||||
dependencies=$(mas list)
|
appfrommas=$(mas list)
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
number=$(echo "$line" | awk '{print $1}')
|
number=$(echo "$line" | awk '{print $1}')
|
||||||
name=$(echo "$line" | awk -F "(" '{print $1}' | awk {'first = $1; $1=""; print $0'} | sed 's/^ //g')
|
name=$(echo "$line" | awk -F "(" '{print $1}' | awk {'first = $1; $1=""; print $0'} | sed 's/^ //g')
|
||||||
echo "#$name" >> brew-install.sh
|
echo "#$name" >> brew-install.sh
|
||||||
echo "mas install $number" >> brew-install.sh
|
echo "mas install $number" >> brew-install.sh
|
||||||
echo " " >> brew-install.sh
|
echo " " >> brew-install.sh
|
||||||
done <<< "$dependencies"
|
done <<< "$appfrommas"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod +x brew-install.sh
|
chmod +x brew-install.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user