blob: 97cdb32f3a405250708e5f7f2ad732264ad273d9 (
plain) (
blame)
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
# cd into script path
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
cd $SCRIPTPATH
# Ignore list
IGNORE=("bin" "wallpaper" "install.sh" ".git" "scripts")
# Install important packages
sudo pacman -S stow
# Prevent from symlinking whole directory
mkdir ~/.gnupg
# Setting up all the symlinks
max=${#IGNORE[@]}
max=$((max-1))
for f in *; do
ignored=false
#Check if package is in ignore list
for i in `seq 0 $max`
do
if [[ ${IGNORE[$i]} == $f ]]; then
ignored=true
fi
done
# Create symlink if not ignored
if [[ $ignored == false ]]; then
stow "$f"
fi
done
|