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