-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelpers.sh
37 lines (32 loc) · 832 Bytes
/
helpers.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function prompt {
read -p "🍕 Are you sure you wish to continue? y/[n] "
if [ "$REPLY" != "y" ]; then
exit
fi
}
function installBrewItemsWithPrompts {
for name in $(<$1)
do
read -p "🍕 Are you sure you wish to install $name? y/[n] "
if [ "$REPLY" == "y" ]; then
brew install $name
fi
done
}
function installBrewCaskItemsWithPrompts {
for name in $(<$1)
do
read -p "🍕 Are you sure you wish to install $name? y/[n] "
if [ "$REPLY" == "y" ]; then
brew install $name
fi
done
}
function installAtomPackages {
if ! command -v apm >/dev/null 2>&1; then
echo "Run Atom and install apm first!"
echo "Afterwards you can always run apm install --packages-file ~/dotfiles/packages/atomlist"
else
apm install --packages-file packages/atomlist
fi
}