-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·36 lines (30 loc) · 919 Bytes
/
install
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
#!/bin/bash
# TODO:
# - Change to use aliases rather than files;
# - Copy vim files;
# - Fix 'directory' bug when installs;
while read l; do
[[ $(command -v "$l") ]] || \
echo "$l not installed. Some functions may not work properly"
done < <(cat dep)
for d in $(ls conf.d/ | sort -n); do
dir="conf.d/${d}"
for f in $(ls $dir | sort -n); do
file="${dir}/${f}"
fwe=$(echo -n "$file" | sed -r 's/.gpg//g')
echo "fwe: $fwe"
[[ $file =~ .*gpg$ ]] && \
echo -e "\nDecrypting $file" && \
gpg --decrypt --quiet "$file" > "${fwe}"
done;
done;
[[ -f ~/.bashrc ]] && (echo -e "\nCreating .bashrc backup" && \
cp -v ~/.bashrc ~/.bashrc.bkp)
echo -e "\nCopying bashrc"
cp -v .bashrc ~/.bashrc
[[ -d ~/.mutt ]] && (echo -e "\nCreating .mutt backup" && \
cp -fRv ~/.mutt ~/.mutt.bkp)
echo -e "\nCopying .mutt"
cp -vfR .mutt ~/.mutt
echo -e "Reloading bash"
exec bash