backup bash cli

This commit is contained in:
do butterflies cry? 2026-03-09 02:43:40 +10:00
parent ff0d13034b
commit 2f49295004
Signed by: cry
GPG key ID: F68745A836CA0412
7 changed files with 0 additions and 0 deletions

58
ceru.bak/ceru Executable file
View file

@ -0,0 +1,58 @@
#!/usr/bin/env bash
# Copyright 2025-2026 _cry64 (Emile Clark-Boman)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -euo pipefail
# ======== CONFIGURATION ========
CERU_USE_NIX3=true
# ======== CONFIGURATION ========
# libceru env vars
THIS=$(basename "$0")
source libceru.sh
USAGE="${BOLD}${UNDERLINE}${RED}Usage${RESET}
${BOLD}${GREEN}$THIS [option...] subcommand${RESET}
${BOLD}${UNDERLINE}${RED}Options${RESET}
${BOLD}${MAGENTA}-h, --help${RESET} Show this message (^_^)
${BOLD}${UNDERLINE}${RED}Subcommands${RESET}
${BOLD}${CYAN}deploy${RESET} Deploy your Cerulean network
${BOLD}${CYAN}new${RESET} Init new instances of various components (see ${BOLD}${GREEN}\`$THIS new --help\`${RESET})"
# parse all args
SUBCMD=false # whether a subcommand was specified
while [[ $# -gt 0 ]]; do
ARG=$1
case $ARG in
-h|--help)
throw-usage 0 ;;
-*)
echo "[!] Unknown option \"$ARG\""
exit 1 ;;
*)
SUBCMD=true
break ;;
esac
done; unset -v ARG
# invalid usage occurs if no args or subcommand given
if [[ $# = 0 || "$SUBCMD" = false ]]; then
throw-usage 1
fi; unset -v SUBCMD
# run provided subcommand
run-subcmd "$@"