Update platform tests to use '.test' folder
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
[ -z "$1" ] || cd $1
|
||||
|
||||
if [ -d ".test" ]; then
|
||||
if [ -d .test ]; then
|
||||
printf "\033[0;31mEnvironment backup already exists!\033[0m\n"
|
||||
else
|
||||
mkdir .test
|
||||
cp -r Marlin/src/pins .test/pins
|
||||
cp Marlin/Configuration*.h .test/
|
||||
[ -f Marlin/_Bootscreen.h ] && cp Marlin/_Bootscreen.h .test/
|
||||
[ -f Marlin/_Statusscreen.h ] && cp Marlin/_Statusscreen.h .test/
|
||||
cp -r Marlin/src/pins .test/pins
|
||||
printf "\033[0;32mEnvironment Backup created\033[0m\n"
|
||||
fi
|
||||
|
@@ -2,25 +2,10 @@
|
||||
|
||||
[ -z "$1" ] || cd $1
|
||||
|
||||
if [ -d ".test" ]; then
|
||||
cp .test/Configuration*.h Marlin/
|
||||
rm .test/Configuration*.h
|
||||
cp Marlin/src/config/default/* Marlin/
|
||||
[ -f Marlin/_Bootscreen.h ] && rm Marlin/_Bootscreen.h
|
||||
[ -f Marlin/_Statusscreen.h ] && rm Marlin/_Statusscreen.h
|
||||
[ -d .test/pins ] && { cp .test/pins/* Marlin/src/pins/ ; rm -rf .test/pins ; }
|
||||
[ -d .test ] && rm -r .test
|
||||
|
||||
if [ -f .test/_Bootscreen.h ]; then
|
||||
cp .test/_Bootscreen.h Marlin/
|
||||
rm .test/_Bootscreen.h
|
||||
fi
|
||||
|
||||
if [ -f .test/_Statusscreen.h ]; then
|
||||
cp .test/_Statusscreen.h Marlin/
|
||||
rm .test/_Statusscreen.h
|
||||
fi
|
||||
|
||||
cp -r .test/pins Marlin/src
|
||||
rm -r .test/pins
|
||||
|
||||
rmdir .test
|
||||
printf "\033[0;32mEnvironment Restored\033[0m\n"
|
||||
else
|
||||
printf "\033[0;31mEnvironment Backup not available!\033[0m\n"
|
||||
fi
|
||||
printf "\033[0;32mEnvironment Restored\033[0m\n"
|
||||
|
@@ -1,17 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# restore_configs
|
||||
#
|
||||
# Restore default configs, delete pins backup and dogm bitmaps
|
||||
#
|
||||
|
||||
cp Marlin/src/config/default/Configuration.h Marlin/Configuration.h
|
||||
cp Marlin/src/config/default/Configuration_adv.h Marlin/Configuration_adv.h
|
||||
# Restore the (possibly modified) Configurations
|
||||
[ -d ".test" -a -f ".test/Configuration.h" ] && cp .test/Configuration*.h Marlin/
|
||||
|
||||
if [ -f Marlin/src/pins/pins_RAMPS.h.backup ]; then
|
||||
cp Marlin/src/pins/pins_RAMPS.h.backup Marlin/src/pins/pins_RAMPS.h
|
||||
rm Marlin/src/pins/pins_RAMPS.h.backup
|
||||
fi
|
||||
# Restore the original unmodified pins
|
||||
[ -d ".test/pins" ] && cp -r .test/pins Marlin/src/pins/
|
||||
|
||||
if [ -f Marlin/_Bootscreen.h ]; then
|
||||
rm Marlin/_Bootscreen.h
|
||||
fi
|
||||
|
||||
if [ -f Marlin/_Statusscreen.h ]; then
|
||||
rm Marlin/_Statusscreen.h
|
||||
fi
|
||||
# Delete DOGM bitmaps
|
||||
rm -f Marlin/_*screen.h
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cp Marlin/Configuration.h Marlin/src/config/default/Configuration.h
|
||||
cp Marlin/Configuration_adv.h Marlin/src/config/default/Configuration_adv.h
|
||||
cp Marlin/Configuration*.h .test/
|
||||
|
Reference in New Issue
Block a user