forked from honestbleeps/BetterZoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakelinks.sh
executable file
·36 lines (32 loc) · 1.21 KB
/
makelinks.sh
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
libfiles=("lib/"*)
modulefiles=("lib/modules/"*)
files=("${libfiles[@]}" "${modulefiles[@]}")
paths=("Chrome" "XPI/data" "Opera" "Safari.safariextension")
for i in "${files[@]}"
do
for j in "${paths[@]}"
do
if [[ -f $i ]]
then
file=$(basename $i)
dir=$(dirname $i)
if [ "$dir" == "lib/modules" ]
then
dest="./$j/modules/"
else
dest="./$j/"
fi
echo "Re-linking:" $dest$file
if [ -f $dest$file ];
then
rm $dest$file
fi
if [ "clean" != "$1" ];
then
mkdir -p $dest
ln ./$i $dest
fi
fi
done
done