Parse flag-like inputs as literal names

This commit is contained in:
Ohad Livne 2025-12-26 00:02:44 +02:00
parent 6a06a995b0
commit db05998d6c
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D

View file

@ -30,7 +30,7 @@ make_editable_copy() {
orig_file="$1" orig_file="$1"
tempfile="$2" tempfile="$2"
try_command cp "${orig_file}" "${tempfile}" try_command cp -- "${orig_file}" "${tempfile}"
} }
elevate_permissions() { elevate_permissions() {
@ -45,13 +45,13 @@ update_file() {
tempfile="$1" tempfile="$1"
orig_file="$2" orig_file="$2"
try_command mv --force "${tempfile}" "${orig_file}" try_command mv --force -- "${tempfile}" "${orig_file}"
} }
clean_tempfiles() { clean_tempfiles() {
tempfile="$1" tempfile="$1"
rm --force "${tempfile}" "${tempfile}.orig" rm --force -- "${tempfile}" "${tempfile}.orig"
} }
if [ "$#" -ne "1" ]; then if [ "$#" -ne "1" ]; then