-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·44 lines (37 loc) · 1.05 KB
/
setup.sh
File metadata and controls
executable file
·44 lines (37 loc) · 1.05 KB
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
#!/bin/bash
# Get the user dir for the user that is executing the script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
HOME=/home/$(echo $DIR | cut -d/ -f3)
# Setup script for splash
printf "Setting up splash...\n"
printf "Setting up install directory ... "
if [ -d "$HOME/.config/splash" ]; then
if ! [ -d "$HOME/.config/splash/exec" ]; then
mkdir "$HOME/.config/splash/exec"
fi
if ! [ -d "$HOME/.config/splash/pipe" ]; then
mkdir "$HOME/.config/splash/pipe"
fi
else
mkdir "$HOME/.config/splash"
mkdir "$HOME/.config/splash/exec"
mkdir "$HOME/.config/splash/pipe"
fi
printf "done!\n"
printf "Install location: $HOME/.config/splash\n"
# Check for Existence of Dependencies
printf "Setting up configuration file\n"
cp config ~/.config/splash/config
printf "Compile splash? [Y / N] "
read b
if [ $b = "Y" ];then
echo "Compiling splash..."
make -C "splash" splash
fi
printf "Compile example programs? [Y / N] "
read b
if [ $b == "Y" ]; then
echo "Compiling programs..."
make -C "program" all
fi
printf "splash: Success"