-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLnCreate_bin.sh
42 lines (33 loc) · 1.21 KB
/
LnCreate_bin.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
#!/bin/bash
ACTION=$1
EXECUTE=
[[ "$ACTION" != "--GO" ]] && EXECUTE='echo'
thisDir="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")" # risolve anche eventuali LINK presenti sullo script
thisDir=$(cd $(dirname "$thisDir"); pwd -P)/$(basename "$thisDir") # GET AbsolutePath
prjDir=${thisDir%/.*} # Remove /. finale (se esiste)
rootDir=$(dirname "$prjDir")
LnLibDir=$rootDir/LnPythonLib
LnPythonLibDir=$rootDir/LnPythonLib
LnLibDir=$prjDir/SOURCE/LnLib
echo $prjDir
echo $rootDir
echo $LnPythonLibDir
cp
exit
outDIR="$prjDir/bin"
LnPythonLibDir=/home/pi/gitREPO
ProjectDir=${prjDir}
# Creazione della LnPythonLib_YYYYMMDD.zip nella directory ${outDIR}
cd ${LnPythonLibDir}
echo
echo "I am in directory:.. ${PWD}"
zipFileName="LnPythonLib_$(date +"%Y%m%d").zip"
$EXECUTE zip -r --exclude='*.git*' ${outDIR}/${zipFileName} ./LnPythonLib/*
echo
# Creazione dello zip di DDNS nella directory ${outDIR}
cd ${ProjectDir}
echo
echo "I am in directory:.. ${PWD}"
zipFileName="DDNS_$(date +"%Y%m%d").zip"
$EXECUTE zip -r --exclude='*.git*' --exclude='bin*' --exclude='conf*' ${outDIR}/${zipFileName} *
echo