feat: Removes pkg subcommands from kanatactl in favor of using package manager.

This commit is contained in:
2025-11-10 16:16:50 -05:00
parent 00c9c77bcc
commit 059dba6f18
3 changed files with 2 additions and 214 deletions

View File

@@ -17,8 +17,7 @@ KBD=${KBD:-""} # Keyboard config to use, either "voyager" or "macbook"
usage() {
cat <<EOF
Manages kanata qmk keyboard program, which needs to be built locally. Currently the linux builds
are only for x86. Also manages the kanata systemd service.
Manages kanata qmk keyboard program, which needs to be built locally. Also manages the kanata systemd service.
USAGE:
@@ -30,8 +29,6 @@ FLAGS:
COMMANDS:
config: Commands for the kanata keyboard configuration file(s).
service: Commands for the kanata systemd service.
pkg: Commands for the kanata package.
bootstrap: Bootstrap a new machine, performs installation, enables, and starts kanata systemd service.
logs: View the log file.
Run "$THIS <command> --help" for more information about a command.
@@ -44,16 +41,6 @@ log() {
logging log --source "$THIS_FILE" "$@"
}
# Bootstrap a new machine, by building and installing the kanata executable,
# installing the systemd service files, and enable / start the service.
bootstrap() {
log "Bootstrapping new system..."
$THIS_FILE pkg install
$THIS_FILE service install
$THIS_FILE service enable
$THIS_FILE service start
}
################################################################################
# MAIN
################################################################################
@@ -65,8 +52,6 @@ setup-logging "$LOG_FILE" "$LOG_LABEL"
while [[ $# -gt 0 ]]; do
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
usage && exit 0
elif [[ $1 == "bootstrap" ]]; then
bootstrap && exit 0
elif [[ $1 == "config" ]]; then
shift
THIS="$THIS config" $SCRIPTS/utils/kanatactl/config "$@"
@@ -75,10 +60,6 @@ while [[ $# -gt 0 ]]; do
shift
THIS="$THIS service" $SCRIPTS/utils/kanatactl/service "$@"
exit $?
elif [[ $1 == "pkg" ]]; then
shift
THIS="$THIS pkg" $SCRIPTS/utils/kanatactl/pkg "$@"
exit $?
elif [[ $1 == "logs" ]]; then
bat ${LOG_DIR:-/tmp/logs}/$LOG_FILE && exit 0
elif [[ $1 == "update" ]]; then