You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcpcfg/scripts/show

33 lines
699 B

#!/bin/bash
# Purpose: show ngcpcfg changes (git show) as part of ngcpcfg framework
################################################################################
set -e
set -u
# support testsuite
FUNCTIONS="${FUNCTIONS:-/usr/share/ngcp-ngcpcfg/functions/}"
HELPER="${HELPER:-/usr/share/ngcp-ngcpcfg/helper/}"
if ! [ -r "${FUNCTIONS}"/main ] ; then
printf "Error: %s/main could not be read. Exiting.\n" "${FUNCTIONS}" >&2
exit 1
fi
# shellcheck disable=SC1090
. "${FUNCTIONS}"/main
if [ "$*" = "" ] ; then
git_commit="HEAD"
else
git_commit="$*"
fi
cd "$NGCPCTL_MAIN"
git show "${git_commit}"
exit 0
## END OF FILE #################################################################