From fc0b91758c976de050cf6fc9e905ab677e79c946 Mon Sep 17 00:00:00 2001 From: Jon Schipp Date: Mon, 21 Jul 2014 15:36:22 -0500 Subject: nacl_build.sh: use portable way of entering previous directory While writing a puppet manifest to provision netsniff-ng on a server. I encountered the following shell warnings: Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: Building NaCl for arch amd64 on host localhost (grab a coffee, this takes a while) ... Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: ./nacl_build.sh: line 41: cd: /root/netsniff-ng/curvetun: No such file or directory Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: NaCl lib path /root/nacl/nacl-20110221/build/localhost/lib/amd64 Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: NaCl include path /root/nacl/nacl-20110221/build/localhost/include/amd64 Notice: /Stage[main]/Netsniff_ng::Install/Exec[Install Netsniff-NG]/returns: ./nacl_build.sh: line 49: ./nacl_path.sh: No such file or directory They went away after I applied this patch. Signed-off-by: Jon Schipp Signed-off-by: Daniel Borkmann --- curvetun/nacl_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curvetun/nacl_build.sh b/curvetun/nacl_build.sh index df6027a..d9ea752 100755 --- a/curvetun/nacl_build.sh +++ b/curvetun/nacl_build.sh @@ -38,7 +38,7 @@ echo "Building NaCl for arch $arch on host $shorthostname (grab a coffee, this t cd "$nacl_build_dir"/"$nacl_version" ./do -cd - > /dev/null +cd $OLDPWD > /dev/null nacl_lib_path="$nacl_build_dir/$nacl_version/build/$shorthostname/lib/$arch" nacl_include_path="$nacl_build_dir/$nacl_version/build/$shorthostname/include/$arch" -- cgit v1.2.3-54-g00ecf