mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
fix sh compatibility
This commit is contained in:
+6
-5
@@ -15,12 +15,13 @@ VENV_BIN=${VENV_PATH}/bin
|
||||
|
||||
if test "`id -u`" -ne "0" ; then
|
||||
if ! type sudo &>/dev/null; then
|
||||
function sudo (){
|
||||
args=("$@")
|
||||
for i in "${!args[@]}"; do
|
||||
args[$i]="'$(printf "%s" "${args[$i]}" | sed -e "s/'/'\"'\"'/g")' "
|
||||
sudo() {
|
||||
args=""
|
||||
while [ $# -ne 0 ]; do
|
||||
args="$args'$(printf "%s" "$1" | sed -e "s/'/'\"'\"'/g")' "
|
||||
shift
|
||||
done
|
||||
su root -c "${args[*]}"
|
||||
su root -c "$args"
|
||||
}
|
||||
fi
|
||||
SUDO=sudo
|
||||
|
||||
Reference in New Issue
Block a user