Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
Shell
123456789101112131415161718192021222324252627282930313233#!/usr/bin/env bashset -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"TARGET_DIR="${HOME}/.local/bin"
mkdir -p "${TARGET_DIR}"
write_wrapper() { local name="$1" local subcommand="$2" local target="${TARGET_DIR}/${name}"
cat > "${target}" <<EOF#!/usr/bin/env bashexec node "${SCRIPT_DIR}/ac-login.mjs" ${subcommand} "\$@"EOF chmod +x "${target}"}
write_wrapper "ac-login" ""write_wrapper "ac-login-fresh" "fresh"write_wrapper "ac-logout" "logout"write_wrapper "ac-status" "status"write_wrapper "ac-token" "token"
echo "Installed AC auth commands to ${TARGET_DIR}:"echo " ac-login"echo " ac-login-fresh"echo " ac-logout"echo " ac-status"echo " ac-token"