Guest User

arch-update

a guest
Jul 31st, 2026
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # Determine which system binary to hand off to
  4. REAL_BIN="/usr/bin/cachy-update"
  5. if [ ! -f "$REAL_BIN" ]; then
  6. REAL_BIN="/usr/bin/arch-update"
  7. fi
  8.  
  9. # 1. Skip security check if this is a passive/background update check
  10. for arg in "$@"; do
  11. case "$arg" in
  12. -c|--check|--check-only|-q|--quiet)
  13. exec "$REAL_BIN" "$@"
  14. ;;
  15. esac
  16. done
  17.  
  18. # 2. Skip interactive check if running without an active terminal (non-TTY)
  19. if [ ! -t 0 ] || [ ! -t 1 ]; then
  20. exec "$REAL_BIN" "$@"
  21. fi
  22.  
  23. # 3. Interactive terminal run: Run security check before update
  24. "$HOME/Documents/Scripts/check-aur-maintainers.sh"
  25. check_status=$?
  26.  
  27. if [ $check_status -ne 0 ]; then
  28. echo -e "\nPress Enter to close..."
  29. read -r
  30. exit $check_status
  31. fi
  32.  
  33. exec "$REAL_BIN" "$@"
Advertisement
Add Comment
Please, Sign In to add comment