implemented a basic structure (no features)

This commit is contained in:
2026-01-28 19:18:02 +01:00
parent 8f20ec55ef
commit 91eb824daa

44
src/paperctl.sh Normal file → Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
echo "Welcome to paperctl, the ultimate cli client/server management tool"
echo "(c)2026 - MyPapertown, MyPaperCloud, Elias Fierke"
echo "Version 1.0"
echo ""
show_help(){
echo "-- HELP --"
echo " -v | Print the current application version"
echo " -h | Show this help text"
echo " -y | Answer all questions with yes"
exit 0
}
print_config(){
echo "-- CURRENT CONFIG --"
cat $HOME/.config/paperctl.cfg
exit 0
}
if [[ "$1" == "access" ]]; then
shift
if [[ -x "./sub/access.sh" ]]; then
./sub/access.sh "$@"
else
echo "Command 'access' not found!" >&2
exit 1
fi
exit 0
fi
while getopts ":cyhv" opt; do
case $opt in
c) print_config ;;
v) exit 0 ;;
h) show_help ;;
y) ALWAYS_YES="1" ;;
\?) echo "Unknown option: -$OPTARG" >&2; exit 1 ;;
:) echo "Option -$OPTARG needs an argument" >&2; exit 1 ;;
esac
done