From 414cf617ff31b1ca7db552d7818043edef26b780 Mon Sep 17 00:00:00 2001 From: trotFunky Date: Tue, 27 Feb 2018 13:36:00 +0100 Subject: [PATCH] =?UTF-8?q?Clean=20de=20la=20s=C3=A9rie=20Rajout=20de=20la?= =?UTF-8?q?=20restauration=20de=20paquets=20dans=20le=20processus=20de=20s?= =?UTF-8?q?auvegarde=20Fichier=20s=C3=A9par=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Perso/package_restore.sh | 11 +++++++++++ Perso/package_save.sh | 16 ++++++++++++++++ Perso/serialToCSV.sh | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 Perso/package_restore.sh diff --git a/Perso/package_restore.sh b/Perso/package_restore.sh new file mode 100644 index 0000000..84bd73d --- /dev/null +++ b/Perso/package_restore.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +cp . /etc/apt/sources.list +cp ./preferences.d/ /etc/apt/preferences.d/my_preferences +cp -r ./sources.list.d/* /etc/apt/sources.list.d + +apt-get update +apt-get install dselect +dpkg --set-selections < "manual_package_save" +apt-get dselect-upgrade +apt-get remove dselect diff --git a/Perso/package_save.sh b/Perso/package_save.sh index aadb344..e31ee8e 100755 --- a/Perso/package_save.sh +++ b/Perso/package_save.sh @@ -37,6 +37,22 @@ echo "rm -r \"$pathName\"" >> $a chmod u+x "$a" +b="package_restore.sh" + +echo "#! /bin/bash" > $b +echo "" >> $b +echo cp . /etc/apt/sources.list >> $b +echo cp ./preferences.d/ /etc/apt/preferences.d/my_preferences >> $b +echo cp -r ./sources.list.d/* /etc/apt/sources.list.d >> $b +echo "" >> $b +echo apt-get update >> $b +echo apt-get install dselect >> $b +echo "dpkg --set-selections < "manual_package_save"" >> $b +echo apt-get dselect-upgrade >> $b +echo apt-get remove dselect >> $b + +chmod u-x "$b" + cd - exit diff --git a/Perso/serialToCSV.sh b/Perso/serialToCSV.sh index 4e30316..30eb346 100755 --- a/Perso/serialToCSV.sh +++ b/Perso/serialToCSV.sh @@ -2,6 +2,7 @@ function pythonGraph { echo "DATAEND" >> "$3" + echo "" > /dev/ttyACM0 python3 /home/trotfunky/Programmation/Git/Python/extraction_asserv.py "$2" "$1" exit } @@ -30,6 +31,7 @@ while true; do echo $line >> "$fileName" case "$line" in *"DATAEND"*) + echo "" > /dev/ttyACM0 break;; esac done