1
0
Fork 0

Clean de la série

Rajout de la restauration de paquets dans le processus de sauvegarde
Fichier séparé
This commit is contained in:
trotFunky 2018-02-27 13:36:00 +01:00
parent b7a5d05c59
commit 414cf617ff
3 changed files with 29 additions and 0 deletions

11
Perso/package_restore.sh Normal file
View file

@ -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

View file

@ -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

View file

@ -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