Try to make it easier for when I update the build script template.
[pkgusr] / etc / pkgusr / bash_profile
index 5f1a4f8..52d885e 100644 (file)
@@ -45,9 +45,18 @@ unset _XORG _KDE _QT _PKGCFG
 #  rationale.
 SUPPRESSLOCALEDIR=1
 
+## Build script update checks
+#  If this is set to `1' (one) a check is done to see if there is a
+#  newer build script available that the pkgusr could update to.  If an
+#  update is available a message is printed to stdout with instructions
+#  of how to proceed.
+#
+#  Override this in ~/.pkgusrrc.
+CHECKUPDATES=1
+
 ### export everything
 export LC_ALL PATH LESS LESSCHARSET LESSOPEN TZ PKG_CONFIG_PATH QTDIR
-export SUPPRESSLOCALEDIR
+export SUPPRESSLOCALEDIR CHECKUPDATES
 
 # Make prompt reflect that we are a package user.
 export PROMPT_COMMAND='PS1="[pkgusr (\u)] \w> "'
@@ -63,6 +72,11 @@ fi
 
 # Go to the home directory whenever we su to a package user.
 cd
+# Maybe check if the build script can be updated.
+if [ ${CHECKUPDATES} -eq 1 ]; then
+    checkupdates
+fi
+
 
 # Local variables:
 # sh-basic-offset: 4