Files

36 lines
1.4 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
# set -e
# Get current cpu architecture used by the make output
case "$(dpkg --print-architecture)" in
amd64) architecture=x64 ;;
*) architecture=$(dpkg --print-architecture) ;;
esac
2024-07-23 16:25:39 +02:00
2026-09-15 16:26:05 +02:00
# Remove old builds while preserving the presentation scripts and example config
find ./out/Tooloop\ OS\ Package/package/assets/presentation/ -mindepth 1 -type d -prune -exec rm -rf -- {} +
find ./out/Tooloop\ OS\ Package/package/assets/presentation/ -type f \
-not -name 'config.example.json' \
-not -name 'start-presentation.sh' \
-not -name 'stop-presentation.sh' \
-delete
2024-07-23 16:25:39 +02:00
# Unzip zip
unzip -o ./out/make/zip/linux/$architecture/Tooloop\ Kiosk\ Browser-linux-$architecture-1.0.0.zip -d ./out/Tooloop\ OS\ Package/package/assets/presentation
2024-07-23 16:25:39 +02:00
# Move contents to Tooloop package directory
mv -f ./out/Tooloop\ OS\ Package/package/assets/presentation/Tooloop\ Kiosk\ Browser-linux-$architecture/* ./out/Tooloop\ OS\ Package/package/assets/presentation/
2024-07-23 16:25:39 +02:00
# Remove empty directory
rm -fr ./out/Tooloop\ OS\ Package/package/assets/presentation/Tooloop\ Kiosk\ Browser-linux-$architecture/
2024-07-23 16:25:39 +02:00
# Copy package to package project
cp -fr ./out/Tooloop\ OS\ Package/ /home/tooloop/Tooloop-Packages/kiosk-browser
2024-07-23 16:25:39 +02:00
# Re-build and deploy all packages and update control center
cd /home/tooloop/Tooloop-Packages/
/bin/bash /home/tooloop/Tooloop-Packages/build.sh
/bin/bash /home/tooloop/Tooloop-Packages/deploy.sh
exit 0