Revert "Fix: bashisms - step 2"
[releng/builder.git] / jjb / netvirt / quagga-build.sh
index 63199dc6cf28bd6f6e75967b85af2522664463a7..294601ebd8a159ae1f0f5b0f505b5bf9d40c6f7e 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2018 The Linux Foundation and others.
@@ -15,8 +15,7 @@ set -e -x
 # The script builds 6wind/quagga source and binary packages from zrpcd
 # repository for testing router functionalities with Netvirt jobs, .
 
-initdir=$(pwd)
-cd "$(pwd)/zrpcd"
+pushd "$(pwd)/zrpcd"
 
 chmod a+x "$(pwd)/pkgsrc/dev_compile_script.sh"
 cd "$(pwd)/pkgsrc" && sudo "./dev_compile_script.sh" -p -d -b -v "$QUAGGA_VERSION"
@@ -39,7 +38,7 @@ case "$OS" in
     ;;
 esac
 
-cd $initdir
+popd
 
 # todo: remove below lines once the scripts in zrpcd repos build the src packages.
 # Ref: https://lists.opendaylight.org/pipermail/integration-dev/2018-July/012330.html