ci: preserve PATH when running waf under sudo

Change-Id: I85bdc5b69de2c2c7b8c0dc5a7aa2927b495e2168
Refs: #4186
diff --git a/.jenkins.d/10-ndn-cxx.sh b/.jenkins.d/10-ndn-cxx.sh
index c23a0bc..9f8a9b2 100755
--- a/.jenkins.d/10-ndn-cxx.sh
+++ b/.jenkins.d/10-ndn-cxx.sh
@@ -1,10 +1,11 @@
 #!/usr/bin/env bash
-set -x
 set -e
 
 JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 source "$JDIR"/util.sh
 
+set -x
+
 pushd /tmp >/dev/null
 
 INSTALLED_VERSION=
@@ -39,9 +40,10 @@
 #     sudo rm -Rf ndn-cxx-latest
 # fi
 
-sudo rm -Rf /usr/local/include/ndn-cxx
+sudo rm -f /usr/local/bin/ndnsec*
+sudo rm -fr /usr/local/include/ndn-cxx
 sudo rm -f /usr/local/lib/libndn-cxx*
-sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
+sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx.pc
 
 ## Change to the hotfix directory instead of the normal ndn-cxx directory
 ## Restore below line when #3920 and #4119 merge.
@@ -51,7 +53,7 @@
 
 ./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain
 ./waf -j1 --color=yes
-sudo ./waf install -j1 --color=yes
+sudo env "PATH=$PATH" ./waf install --color=yes
 
 popd >/dev/null
 popd >/dev/null