summary refs log tree commit diff stats
path: root/install.sh
blob: e16a49f5628b9f8599aaca45723074f5442e0f69 (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
#!/usr/bin/bash

# cd into script path
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
cd $SCRIPTPATH

# Ignore list
IGNORE=("bin" "wallpaper" "install.sh" ".git")

# Install important packages
sudo pacman -S stow

# 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