-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·30 lines (23 loc) · 811 Bytes
/
init.sh
File metadata and controls
executable file
·30 lines (23 loc) · 811 Bytes
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
#!/bin/bash
if [ "$EUID" == 0 ]
then echo "Do not run as root"
exit
fi
#setup the config files
mkdir $HOME/.config/screenshot-utils
#create the file the scripts go into
mkdir $HOME/.scripts
mkdir $HOME/.scripts/screenshot-utils
#setup config files
echo "FALSE" > $HOME/.config/screenshot-utils/copy-path
mkdir $HOME/Pictures/Screenshots
echo $HOME/Pictures/Screenshots > $HOME/.config/screenshot-utils/screenshot-path
mv screenshot selective_screenshot window_screenshot $HOME/.scripts/screenshot-utils/
exists_in_path=$(cat $HOME/.bashrc | grep -c "export PATH=\$HOME/.scripts/screenshot-utils:\$PATH")
if [ $exists_in_path == 0 ]
then
echo "export PATH=\$HOME/.scripts/screenshot-utils:\$PATH" >> $HOME/.bashrc
fi
echo "Installation finished."
echo "You can now remove this folder."
rm init.sh