mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-11-22 21:47:19 +00:00
Fix https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
This commit is contained in:
parent
b356c879d7
commit
d10c45c232
24
patch.sh
24
patch.sh
@ -89,25 +89,25 @@ if [[ ( ! "$patch" ) || ( ! "$object" ) ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $rollback_flag ]]; then
|
if [[ $rollback_flag ]]; then
|
||||||
if [[ -f $backup_path/"$object".$driver_version ]]; then
|
if [[ -f "$backup_path/$object.$driver_version" ]]; then
|
||||||
cp -p $backup_path/"$object".$driver_version \
|
cp -p "$backup_path/$object.$driver_version" \
|
||||||
$driver_dir/"$object".$driver_version
|
"$driver_dir/$object.$driver_version"
|
||||||
echo "Restore from backup $object.$driver_version"
|
echo "Restore from backup $object.$driver_version"
|
||||||
else
|
else
|
||||||
echo "Backup not found. Try to patch first."
|
echo "Backup not found. Try to patch first."
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ ! -f $backup_path/"$object".$driver_version ]]; then
|
if [[ ! -f "$backup_path/$object.$driver_version" ]]; then
|
||||||
echo "Attention! Backup not found. Copy current libnvidia-encode to backup."
|
echo "Attention! Backup not found. Copy current $object to backup."
|
||||||
mkdir -p $backup_path
|
mkdir -p "$backup_path"
|
||||||
cp -p $driver_dir/"$object".$driver_version \
|
cp -p "$driver_dir/$object.$driver_version" \
|
||||||
$backup_path/"$object".$driver_version
|
"$backup_path/$object.$driver_version"
|
||||||
fi
|
fi
|
||||||
sha1sum $backup_path/"$object".$driver_version
|
sha1sum "$backup_path/$object.$driver_version"
|
||||||
sed "$patch" $backup_path/"$object".$driver_version > \
|
sed "$patch" "$backup_path/$object.$driver_version" > \
|
||||||
$driver_dir/"$object".$driver_version
|
"$driver_dir/$object.$driver_version"
|
||||||
sha1sum $driver_dir/"$object".$driver_version
|
sha1sum "$driver_dir/$object.$driver_version"
|
||||||
ldconfig
|
ldconfig
|
||||||
echo "Patched!"
|
echo "Patched!"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user