mirror of https://github.com/sipwise/ngcpcfg.git
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.
40 lines
1005 B
40 lines
1005 B
#!/bin/bash
|
|
# Purpose: show ngcpcfg log (git log) in human readable format
|
|
################################################################################
|
|
|
|
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
|
|
|
|
cd "$NGCPCTL_MAIN"
|
|
|
|
if [ -f "${FUNCTIONS}/ha_features" ] ; then
|
|
|
|
if ! git remote update origin >/dev/null 2>&1 ; then
|
|
log_error "Failed to fetch changes from shared repository"
|
|
exit 1
|
|
fi
|
|
|
|
git log "$@" --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s [%ai] %d" master origin/master
|
|
|
|
else
|
|
|
|
git log "$@" --oneline --date-order --graph --date=rfc --format=format:"%h (%ar) %s [%ai] %d" master
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
## END OF FILE #################################################################
|