diff --git a/rpi_setup/files/Desktop/premade_scripts/update_script.sh b/rpi_setup/files/Desktop/premade_scripts/update_script.sh new file mode 100644 index 0000000..bfb0da4 --- /dev/null +++ b/rpi_setup/files/Desktop/premade_scripts/update_script.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +URL_TO_FILE=$1 +ZIP_FILE=$2 +SCRIPT_FILE_TO_EXECUTE=$3 +FOLDER_TMP_FILES=${HOME}/tmp + +rm -rf ${FOLDER_TMP_FILES} +mkdir -p ${FOLDER_TMP_FILES} +cd ${FOLDER_TMP_FILES} +wget ${URL_TO_FILE}/${ZIP_FILE} +unzip ${ZIP_FILE} +chmod +x ./${SCRIPT_FILE_TO_EXECUTE} +./${SCRIPT_FILE_TO_EXECUTE} diff --git a/rpi_setup/files/Desktop/update_to_stable.sh b/rpi_setup/files/Desktop/update_to_stable.sh new file mode 100644 index 0000000..9841c8e --- /dev/null +++ b/rpi_setup/files/Desktop/update_to_stable.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +premade_scripts/update_script.sh https://github.com/Lorenzooone/cc3dsfs/releases/latest/download cc3dsfs_rpi_kiosk_setup.zip setup.sh diff --git a/rpi_setup/files/Desktop/update_to_unstable.sh b/rpi_setup/files/Desktop/update_to_unstable.sh new file mode 100644 index 0000000..2ba5176 --- /dev/null +++ b/rpi_setup/files/Desktop/update_to_unstable.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +premade_scripts/update_script.sh https://github.com/Lorenzooone/cc3dsfs/releases/download/nightly-latest cc3dsfs_rpi_kiosk_setup.zip setup.sh diff --git a/rpi_setup/setup.sh b/rpi_setup/setup.sh index 2a3e763..79e3b06 100755 --- a/rpi_setup/setup.sh +++ b/rpi_setup/setup.sh @@ -37,6 +37,8 @@ chmod +x -R ${HOME}/Desktop/premade_scripts/ chmod +x -R ${HOME}/Desktop/${PROGRAM_NAME}_versions/ chmod +x ${HOME}/Desktop/${PROGRAM_NAME} chmod +x ${HOME}/Desktop/${PROGRAM_NAME}_script.sh +chmod +x ${HOME}/Desktop/update_to_unstable.sh +chmod +x ${HOME}/Desktop/update_to_stable.sh if [ -e /boot/firmware/config.txt ]; then FIRMWARE=/firmware