diff --git a/script.sh b/script.sh index 9f48b99..c5dd796 100755 --- a/script.sh +++ b/script.sh @@ -82,8 +82,15 @@ if [[ ! -v backupPaths ]]; then fi fi -# Debug output: .env file with hidden token if [ "$debug_output" = true ]; then + # Debug output: Show last command + begin_debug_line + if [[ "$SHELL" == */bash* ]]; then + echo -n "Command: " && tail -n 3 ~/.bash_history | head -n 1 + fi + end_debug_line + + # Debug output: .env file with hidden token begin_debug_line while IFS= read -r line; do if [[ $line == github_token=* ]]; then @@ -94,6 +101,7 @@ if [ "$debug_output" = true ]; then done < $HOME/klipper-backup/.env end_debug_line + # Debug output: Check git repo if [[ $git_host == "github.com" ]]; then begin_debug_line if curl -fsS "https://api.github.com/repos/${github_username}/${github_repository}" >/dev/null; then