-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·38 lines (34 loc) · 856 Bytes
/
install.sh
File metadata and controls
executable file
·38 lines (34 loc) · 856 Bytes
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
38
#!/usr/bin/bash
# install system packages (requires sudo)
install_packages() {
if ! type sudo > /dev/null; then
echo "sudo is not installed/configured: skipping package install for now"
return
fi
sudo pacman -S - < packages.txt
}
# install config files
install_configs() {
mkdir -p $HOME/.config
cp -r config/* $HOME/.config/
cp vimrc $HOME/.vimrc
cp zshrc $HOME/.zshrc
# install secret files, if available (cloned)
if [ -d dots-secrets ]; then
cd dots-secrets
source install.sh
cd ..
else
echo "dots-secrets was not cloned. if you have access, use --recurse-submodules when cloning."
fi
}
while getopts ":cp" opt; do
case "$opt" in
c)
install_configs
;;
p)
install_packages
;;
esac
done