From a5fbf367e42b1d443b526acf515e5fdf71f28c91 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 24 Jul 2024 05:43:33 +0300 Subject: ak-fs: new flag --list --- bin/ak-fs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/ak-fs b/bin/ak-fs index 10ff912..c6c1bf8 100755 --- a/bin/ak-fs +++ b/bin/ak-fs @@ -5,30 +5,29 @@ ## Usage: ## ## -h, --help Prints this help message -## ## --add, --import Adds/Imports a file to the AKFS system -## ## --get, --export Exports a file from the AKFS system -## ## --cat Concatenates from given hash +## --list Lists names and roots available ## fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) descriptionString="AKFS tools" -# At least these source $AK_LIBDIR/_ak_log source $AK_LIBDIR/_ak_script source $AK_LIBDIR/_ak_fs -# Flags to run -if [ ! -z $1 ]; then +if [ ! -z $1 ] +then case $1 in -h | --help) _ak_usage; exit;; --add|--import) _ak_fs_import $2; exit;; --get|--export) _ak_fs_export $2 $3; exit;; --cat) _ak_fs_cat $2; exit;; + --list) _ak_fs_list; exit;; * ) _ak_usage;; esac -else _ak_usage +else + _ak_usage fi -- cgit v1.2.3