forked from honestbleeps/Reddit-Enhancement-Suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakelinks.sh
More file actions
executable file
·36 lines (33 loc) · 730 Bytes
/
makelinks.sh
File metadata and controls
executable file
·36 lines (33 loc) · 730 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
31
32
33
34
35
36
#!/bin/bash
files=("reddit_enhancement_suite.user.js" "res.css" "nightmode.css" "commentBoxes.css" \
"jquery-1.10.2.min.js" "jquery-fieldselection.min.js" \
"jquery.dragsort-0.6.js" "jquery.tokeninput.js" \
"tinycon.js" "snuownd.js" "guiders-1.2.8.js")
paths=("Chrome" "XPI/data" "Opera" "OperaBlink" "RES.safariextension")
for i in "${files[@]}"
do
for j in "${paths[@]}"
do
if [ "$j" == "Opera" ];
then
if [[ "$i" == *.user.js || "$i" == *.css ]];
then
dest="./$j/includes/"
else
dest="./$j/modules/"
fi
else
dest="./$j/"
fi
echo "Re-linking:" $dest$i
if [ -f $dest$i ];
then
rm $dest$i
fi
if [ "clean" != "$1" ];
then
mkdir -p $dest
ln ./lib/$i $dest
fi
done
done