Commit 5c7b5702 authored by Nostrus Admin's avatar Nostrus Admin Committed by Jai Luthra

Added root check to patch.sh and patch-fbc.sh

parent 081807cc
...@@ -4,6 +4,15 @@ set -euo pipefail ; # <- this semicolon and comment make options apply ...@@ -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) # even when script is corrupt by CRLF line terminators (issue #75)
# empty line must follow this comment for immediate fail with CRLF newlines # 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" backup_path="/opt/nvidia/libnvidia-fbc-backup"
silent_flag='' silent_flag=''
manual_driver_version='' manual_driver_version=''
......
...@@ -4,6 +4,15 @@ set -euo pipefail ; # <- this semicolon and comment make options apply ...@@ -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) # even when script is corrupt by CRLF line terminators (issue #75)
# empty line must follow this comment for immediate fail with CRLF newlines # 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" backup_path="/opt/nvidia/libnvidia-encode-backup"
silent_flag='' silent_flag=''
manual_driver_version='' manual_driver_version=''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment