forked from MewX/Psiphon3-for-Linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·50 lines (45 loc) · 1.11 KB
/
install.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
INST=inst
DGVER=`src/dg.exe -Fver -vs`
DGWER=`echo $DGVER|sed 's/\./_/g'`
DGROOT=$INST/dg$DGWER/DGROOT
echo DGROOT=$DGROOT
if [ ! -d $INST ]; then
mkdir $INST
fi
if [ ! -d $INST/dg$DGWER ]; then
mkdir $INST/dg$DGWER
fi
if [ ! -d $DGROOT ]; then
mkdir $DGROOT
mkdir $DGROOT/bin
mkdir $DGROOT/doc
mkdir $DGROOT/etc
mkdir $DGROOT/lib
mkdir $DGROOT/subin
fi
cp -p CONTENTS.txt $INST/dg$DGWER
cp -p COPYRIGHT $DGROOT/doc/
cp -p LICENSE.txt $DGROOT/doc/
cp -p LICENSE-ja.txt $DGROOT/doc/
cp -p src/delegated $DGROOT/bin/dg$DGWER
cp -p dg9.conf.txt $DGROOT/bin/dg$DGWER.conf
cp -p setup-subin.sh $DGROOT/subin/
cp -p subin/dgchroot $DGROOT/subin/
cp -p subin/dgcpnod $DGROOT/subin/
cp -p subin/dgbind $DGROOT/subin/
cp -p subin/dgdate $DGROOT/subin/
cp -p subin/dgforkpty $DGROOT/subin/
cp -p subin/dgpam $DGROOT/subin/
(
cd $DGROOT/subin
setup-subin.sh
)
#find $INST -ls
echo "#### INSTALLED ####"
find $INST -type f -printf '%AH:%AM %M %-6u %-6g %p\n'
BINPATH=`pwd`/$DGROOT/bin
echo "#### DO ####"
echo "export PATH=\$PATH:$BINPATH"
echo "setenv PATH \$PATH:$BINPATH"
echo "############"