Skip to content

Commit

Permalink
Added root check to patch.sh and patch-fbc.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
nostrus-dominion authored and jailuthra committed Nov 24, 2024
1 parent 081807c commit 5c7b570
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions patch-fbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ set -euo pipefail ; # <- this semicolon and comment make options apply
# even when script is corrupt by CRLF line terminators (issue #75)
# empty line must follow this comment for immediate fail with CRLF newlines

# root check
if [ "$(id -u)" -ne 0 ]; then
echo
echo -e "Please run as root!"
echo
exit 1
fi


backup_path="/opt/nvidia/libnvidia-fbc-backup"
silent_flag=''
manual_driver_version=''
Expand Down
9 changes: 9 additions & 0 deletions patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ set -euo pipefail ; # <- this semicolon and comment make options apply
# even when script is corrupt by CRLF line terminators (issue #75)
# empty line must follow this comment for immediate fail with CRLF newlines

# root check
if [ "$(id -u)" -ne 0 ]; then
echo
echo -e "Please run as root!"
echo
exit 1
fi


backup_path="/opt/nvidia/libnvidia-encode-backup"
silent_flag=''
manual_driver_version=''
Expand Down

0 comments on commit 5c7b570

Please sign in to comment.