-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlar.sh
57 lines (49 loc) · 1.45 KB
/
lar.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
51
52
53
54
55
56
57
#!/bin/sh
grf="Gruntfile.js"
cpath=`pwd`
filename=$(basename -- "$cpath")
extension="${filename##*.}"
a="$extension"
echo "cpath = $cpath, extension = $extension"
dpath="/c/iobroker/Test2/node_modules/iobroker.$a"
if [ -d "$dpath" ]; then
echo "dpath = $dpath"
else
dpath="/c/iobroker/Test2/node_modules/ioBroker.$a"
if [ -d "$dpath" ]; then
echo "dpath = $dpath"
else
echo "$dpath not found!"
exit 1
fi
fi
inspect="--inspect"
if [ "$1" == "d" ] || [ $# -gt 1 ]; then
echo "Debug mode set"
shift
inspect="--inspect-brk"
fi
#shift
#sudo chmod aug+rw $cpath/*
echo sudo -u iobroker rsync -r -v -u $cpath/*.js *.json *.md $dpath/
rsync -r -v -u --delete $cpath/*.js $cpath/*.json $cpath/*.md $dpath/
for var in "$@"; do
echo "rsync -r -v -u - $cpath/$var $dpath"
# rsync -r -v -u - $cpath/$var $dpath
# sudo cp $cpath/$var $dpath
done
for var in lib admin plugins; do
echo rsync -r -v -u $cpath/$var $dpath/
rsync -r -v -u --delete $cpath/$var $dpath/
done
rsync -r -v -u --delete $cpath/admin $dpath/../../iobroker-data/files/$a.admin
echo "all done!"
ls -CFA $dpath
cd /c/iobroker/Test2
/c/iobroker/Test2/iob.bat upload $a
#iobroker upload $a
#echo sudo chown -hR iobroker $dpath
#sudo chown -hR iobroker $dpath
#sudo chgrp -hR iobroker $dpath
echo sudo -u iobroker node --inspect=localhost:9229 $dpath/$a.js --force --logs --nolazy
node $inspect=localhost:9229 $dpath/$a.js --force --logs --nolazy