1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__task-lalis/SOURCES/sync_check.sh
Daniel Tartavel 4696308e2d debug
2019-03-26 22:10:25 +01:00

24 lines
498 B
Bash
Executable File

#!/usr/bin/sh
DESKTOP=`grep XDG_DESKTOP_DIR $1/.config/user-dirs.dirs`
DESKTOP=${DESKTOP##*}
export $DESKTOP
/usr/local/bin/identPC.sh
/usr/bin/kate $DESKTOP/checklist.txt
grep -is -m 2 "numéro de série" $DESKTOP/identification.txt >tmp.txt
while read LIGNE
do
TMP=${LIGNE##*}
if [ "$TMP" != "Number" ];then
DIRNAME="$DIRNAME$TMP"
break
else
DIRNAME="CM_"
fi
done < tmp.txt
rm -f tmp.txt
mkdir $DIRNAME
rsync --port 10073 -aP $DESKTOP/*.txt "lalis69.ddns.net::lalis-ordis/$DIRNAME"