Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Determine which system binary to hand off to
- REAL_BIN="/usr/bin/cachy-update"
- if [ ! -f "$REAL_BIN" ]; then
- REAL_BIN="/usr/bin/arch-update"
- fi
- # 1. Skip security check if this is a passive/background update check
- for arg in "$@"; do
- case "$arg" in
- -c|--check|--check-only|-q|--quiet)
- exec "$REAL_BIN" "$@"
- ;;
- esac
- done
- # 2. Skip interactive check if running without an active terminal (non-TTY)
- if [ ! -t 0 ] || [ ! -t 1 ]; then
- exec "$REAL_BIN" "$@"
- fi
- # 3. Interactive terminal run: Run security check before update
- "$HOME/Documents/Scripts/check-aur-maintainers.sh"
- check_status=$?
- if [ $check_status -ne 0 ]; then
- echo -e "\nPress Enter to close..."
- read -r
- exit $check_status
- fi
- exec "$REAL_BIN" "$@"
Advertisement
Add Comment
Please, Sign In to add comment