aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-11-02 20:00:43 +0100
committerGitHub <noreply@github.com>2021-11-02 20:00:43 +0100
commit886ad0055f20ca70247b1290759903f244c27f88 (patch)
treee98c01c8bfe37cdda3d2cfe3c78552d6495012e7 /scripts
parent647baaa15161bfaeaf46f473af8278c975f0200a (diff)
parent447350fe0ea29d8c45e1d7436d8a148f01bf7a42 (diff)
Merge pull request #5459 from andersk/echo-e
installer: Do not use echo -e in #!/bin/sh script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install-nix-from-closure.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 28d884c79..e25978da7 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -215,7 +215,7 @@ if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then
if [ -w "$fn" ]; then
if ! grep -q "$p" "$fn"; then
echo "modifying $fn..." >&2
- echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn"
+ printf '\nif [ -e %s ]; then . %s; fi # added by Nix installer\n' "$p" "$p" >> "$fn"
fi
added=1
break
@@ -226,7 +226,7 @@ if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then
if [ -w "$fn" ]; then
if ! grep -q "$p" "$fn"; then
echo "modifying $fn..." >&2
- echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn"
+ printf '\nif [ -e %s ]; then . %s; fi # added by Nix installer\n' "$p" "$p" >> "$fn"
fi
added=1
break