Add git command + --debug and additional usage
This commit is contained in:
parent
d6c9475600
commit
fc682920ed
|
@ -280,6 +280,12 @@ manage-ipvlan() {
|
||||||
# ip link show [ DEVICE | group GROUP ] [up] [master DEV] [vrf NAME] [type TYPE] [nomaster]
|
# ip link show [ DEVICE | group GROUP ] [up] [master DEV] [vrf NAME] [type TYPE] [nomaster]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${1}" == '--debug' ]; then
|
||||||
|
shift
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
cli)
|
cli)
|
||||||
runtipi-cli "${@:2}"
|
runtipi-cli "${@:2}"
|
||||||
|
@ -342,6 +348,11 @@ case "${1}" in
|
||||||
editme)
|
editme)
|
||||||
${VISUAL:-${EDITOR:-vi}} "$(readlink -f "$0")"
|
${VISUAL:-${EDITOR:-vi}} "$(readlink -f "$0")"
|
||||||
;;
|
;;
|
||||||
|
git)
|
||||||
|
GIT_ARGS="$( printf '"%s" ' "${@:2}" )"
|
||||||
|
[ "$GIT_ARGS" != '"update"' ] || GIT_ARGS="pull --rebase --autostash"
|
||||||
|
exec sh -c 'cd user-config && git '"${GIT_ARGS}"'; exit $?'
|
||||||
|
;;
|
||||||
_load)
|
_load)
|
||||||
echo "alias ${BASE_NAME}cd='cd \"$SCRIPT_DIR/..\"'"
|
echo "alias ${BASE_NAME}cd='cd \"$SCRIPT_DIR/..\"'"
|
||||||
;;
|
;;
|
||||||
|
@ -354,31 +365,36 @@ case "${1}" in
|
||||||
"Available commands:" "" ""\
|
"Available commands:" "" ""\
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
"runtipi" "" ""\
|
"runtipi" "" ""\
|
||||||
"" "cli" "runtipi-cli" \
|
"" "cli" "runtipi-cli" \
|
||||||
"" "log" "runtipi docker stack logs" \
|
"" "log" "runtipi docker stack logs" \
|
||||||
"" "start" "start runtipi" \
|
"" "start" "start runtipi" \
|
||||||
"" "update" "update runtipi to a specific version" \
|
"" "update" "update runtipi to a specific version" \
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
"docker/docker-compose" "" ""\
|
"docker/docker-compose" "" ""\
|
||||||
"" "tpcompose" "docker compose for runtipi apps" \
|
"" "tpcompose" "docker compose for runtipi apps" \
|
||||||
"" "ixcompose" "docker compose for ix/TrueNAS SCALE docker based app" \
|
"" "ixcompose" "docker compose for ix/TrueNAS SCALE docker based app" \
|
||||||
"" "ls" "list applications (or contrainers)" \
|
"" "ls" "list applications (or contrainers)" \
|
||||||
"" "dls" "stylized docker ls" \
|
"" "dls" "stylized docker ls" \
|
||||||
"" "shell" "enter an insteractive shell" \
|
"" "shell" "enter an insteractive shell" \
|
||||||
"" "down-all" "stop and remove everything" \
|
"" "down-all" "stop and remove everything" \
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
"networking" "" ""\
|
"networking" "" ""\
|
||||||
"" "ipvlan" "manage ipvlan networking interface fix" \
|
"" "ipvlan" "manage ipvlan networking interface fix" \
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
"misc." "" ""\
|
"misc." "" ""\
|
||||||
"" "exec" "execute within the shell, START_DIR env applies" \
|
"" "exec" "execute within the shell, START_DIR env applies" \
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
"" "setup" "setup runtipictl in user's .local/bin dir" \
|
"" "setup" "setup runtipictl in user's .local/bin dir" \
|
||||||
"" "" "${BASE_NAME} setup" \
|
"" "" "${BASE_NAME} setup" \
|
||||||
"" "" "${BASE_NAME} setup '' ~/.local/bin/${BASE_BASE_NAME}" \
|
"" "" "${BASE_NAME} setup '' ~/.local/bin/${BASE_BASE_NAME}" \
|
||||||
|
"" "" "${BASE_NAME} setup '' ~/.local/bin/tpc" \
|
||||||
"" "" "${BASE_NAME} setup '' ~/.local/bin/runtipictl" \
|
"" "" "${BASE_NAME} setup '' ~/.local/bin/runtipictl" \
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
|
"" "editme" "Open the script in the EDITOR" \
|
||||||
|
"" "git [update]" "Perform git operations on user-config," \
|
||||||
|
"" "" "update sub-command is a shortcut to pull --autostash --rebase" \
|
||||||
"Related env. vars:" "" "" \
|
"Related env. vars:" "" "" \
|
||||||
|
"" "" "" \
|
||||||
"" "VISUAL EDITOR RPH_UID QUIET START_DIR ROOT_EXEC" ""
|
"" "VISUAL EDITOR RPH_UID QUIET START_DIR ROOT_EXEC" ""
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue