diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-06-24 03:40:06 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-06-24 03:40:06 +0300 |
commit | 0c8f9f5ed254c923c368c8fa92d352f8da89b3ca (patch) | |
tree | 3cf2738bc8d9a7844ac18356a16f3b91c4187073 /bin/ak-fs | |
parent | 00bcb191d56b8dbc40c12058236eb12827b1b320 (diff) | |
download | arching-kaos-tools-0c8f9f5ed254c923c368c8fa92d352f8da89b3ca.tar.gz arching-kaos-tools-0c8f9f5ed254c923c368c8fa92d352f8da89b3ca.tar.bz2 arching-kaos-tools-0c8f9f5ed254c923c368c8fa92d352f8da89b3ca.zip |
- Moved previous ak-fs-* scripts to library
- Made an ak-fs to select the previous as flags in a "main script"
- Feature: 3rd_gen_map where the sha512sum of the original file (pre
base64 encoding) and its original named are stored in the first line
and the second line holds the sha512sum of the level.1.map
new file: bin/ak-fs
deleted: bin/ak-fs-add
deleted: bin/ak-fs-cat
deleted: bin/ak-fs-get
modified: lib/_ak_fs
Diffstat (limited to 'bin/ak-fs')
-rwxr-xr-x | bin/ak-fs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/ak-fs b/bin/ak-fs new file mode 100755 index 0000000..10ff912 --- /dev/null +++ b/bin/ak-fs @@ -0,0 +1,34 @@ +#!/bin/bash +## +## Tools to add, get and cat files to/from the Arching Kaos File System +## +## Usage: +## +## -h, --help Prints this help message +## +## --add, --import <file> Adds/Imports a file to the AKFS system +## +## --get, --export <hash> <output file> Exports a file from the AKFS system +## +## --cat <hash> Concatenates from given hash +## +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 + 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;; + * ) _ak_usage;; + esac +else _ak_usage +fi |