-#!/bin/sh
+#!/bin/bash
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2018 The Linux Foundation and others.
# 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"
;;
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