To get started, gsu application writers need to know how the gsu()
function works. So let's provide a small introduction here and a
minimal example.
result="$(($n - 1))"
}
+# Entry point for all gsu-based scripts.
+#
+# The startup part of the application script should source this file to load
+# the functions defined here, and then call gsu(). Functions starting with com_
+# are automatically recognized as subcommands.
+#
+# Minimal example:
+#
+# com_hello()
+# {
+# echo 'hello world'
+# }
+# gsu_dir=${gsu_dir:-/system/location/where/gsu/is/installed}
+# . $gsu_dir/subcommand || exit 1
+# gsu "$@"
gsu()
{
local i