From 48705c8dce0eaeb3e7361962c80c938b657e6203 Mon Sep 17 00:00:00 2001 From: paperbenni Date: Thu, 30 Jul 2020 12:13:05 +0200 Subject: [PATCH] run userinstall on update --- autostart.sh | 16 ++++++++-------- setup/defaultapps | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/autostart.sh b/autostart.sh index 885a35b..e4d96cf 100755 --- a/autostart.sh +++ b/autostart.sh @@ -4,10 +4,16 @@ ## script for instantOS autostart ## ############################################### -# run userinstall to determine device properties -if ! iconf -i userinstall; then +INSTANTVERSION="$(cat /usr/share/instantutils/version)" +if iconf version && [ "$(iconf version)" = "$INSTANTVERSION" ]; then + echo "version check successful" + echo "running version $INSTANTVERSION" +else + echo "running update hooks" /usr/share/instantutils/userinstall.sh iconf -i userinstall 1 + iconf version "$INSTANTVERSION" + instantutils default fi # architecture detection @@ -346,9 +352,3 @@ fi if [ -e ~/.instantautostart ]; then bash ~/.instantautostart & fi - -# symlink default applications -if ! iconf terminal; then - echo "setting up default applications" - instantutils default -fi diff --git a/setup/defaultapps b/setup/defaultapps index b4e4b59..578fe7d 100644 --- a/setup/defaultapps +++ b/setup/defaultapps @@ -3,6 +3,8 @@ # this program reads a list of default applications from iconf # and then symlinks them to the home config dir to be executed from there +echo "setting up default applications" + [ -e ~/.config/instantos/default ] || mkdir -p ~/.config/instantos/default cd ~/.config/instantos/default || exit -- 2.11.0