#
# etc/profile
#
-# To test:
+# To test with busybox:
# docker run --rm -it -v $NB_ROOT:$NB_ROOT alpine sh -c " . $NB_ROOT/etc/profile --debug && nb_repos && echo OK"
#
# Load order:
fi
-nb_unset() {
+_nb_unset() {
unset i tmp NB_ETC_DIR NB_DEBUG NB_LOOP
return 0
}
[ -n "$NB_DEBUG" ] && $NB_DEBUG ". $NB_ETC_DIR/profile.d/functions"
if [ ! -e "$NB_ETC_DIR/profile.d/functions" ] || ! . "$NB_ETC_DIR/profile.d/functions"; then
echo "ERR: $NB_ETC_DIR: Wrong directory (no profile.d/functions)" 1>&2
- nb_unset
+ _nb_unset
return 1
fi
fi
-#export NB_LASTTIME=$(date +"%Y-%M-%d %T")
-nb_unset
-unset -f nb_unset 2> /dev/null
+#export NB_LAST_LOAD_TIME=$(date +"%Y-%M-%d %T")
+_nb_unset
+unset -f _nb_unset 2> /dev/null
return 0