-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
45 lines (37 loc) · 1008 Bytes
/
install.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
38
39
40
41
42
43
44
45
#!/bin/sh
dotfiles(){
CONFIG_PATH=$(pwd)/.config
LOCAL_PATH=$(pwd)/.local/share
echo moving dots...
for item in $(\ls $CONFIG_PATH)
do
if [[ -d $HOME/.config/$item || -f $HOME/.config/$item ]]; then
echo $item exist
else
echo moving $item to $HOME/.config
cp -rt "$HOME/.config" "$(pwd)/.config/$item"
fi
done
for loc in $(\ls $LOCAL_PATH)
do
if [[ -d $HOME/.local/$loc || -f $HOME/.config/$loc ]]; then
echo $loc exist
else
echo moving $loc to $LOCAL_PATH
cp -rt $HOME/.local "$LOCAL_PATH/fonts"
fi
done
}
install(){
yay -S $(< packages.txt) --needed
}
clean(){
echo -e "\nHere is files to delete" && ls -lah
#rm -r $(pwd)
}
read -p "Do you really want to install dotfiles? (y/n):" install
case $install in
[Yy]* ) dotfiles; break;;
[Nn]* ) echo "Exiting..."; exit 1; break;;
* ) echo "Please answer yes or no.";;
esac