## 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
if [ -e ~/.instantautostart ]; then
bash ~/.instantautostart &
fi
-
-# symlink default applications
-if ! iconf terminal; then
- echo "setting up default applications"
- instantutils default
-fi
# 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