aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/db.sh b/src/db.sh
index d987e85..b057202 100644
--- a/src/db.sh
+++ b/src/db.sh
@@ -263,6 +263,23 @@ unlink_obsolete_entries() {
done
}
+parse_mode() {
+ if [ "$#" -ne 1 ]; then
+ echo "usage: ${FUNCNAME[0]} MODE" >&2
+ return 1
+ fi
+
+ local mode="$1"
+ shift
+
+ if [ -z "$mode" ]; then
+ dump "mode cannot be empty" >&2
+ return 1
+ fi
+
+ echo "$mode"
+}
+
chmod_entries() {
if [ "$#" -ne 1 ]; then
echo "usage: ${FUNCNAME[0]} MODE" >&2