OSDN Git Service

run userinstall on update
authorpaperbenni <paperbenni@gmail.com>
Thu, 30 Jul 2020 10:13:05 +0000 (12:13 +0200)
committerpaperbenni <paperbenni@gmail.com>
Thu, 30 Jul 2020 10:13:05 +0000 (12:13 +0200)
autostart.sh
setup/defaultapps

index 885a35b..e4d96cf 100755 (executable)
@@ -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
index b4e4b59..578fe7d 100644 (file)
@@ -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