1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/packaging/bin/update-pkginfo
Andreas Schneider 3849802497 packaging: Reformat shell scripts
shfmt -f packaging/ | xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 24 10:13:36 UTC 2022 on sn-devel-184
2022-02-24 10:13:36 +00:00

32 lines
590 B
Bash
Executable File

#!/bin/bash
VERSION=$1
RELEASE=$2
REVISION=$3
if [ "x${REVISION}" = "x" ]; then
RPMREVISION=""
else
RPMREVISION=".${REVISION}"
fi
if [ $# -ne 3 ]; then
echo Usage: update-pkginfo VERSION RELEASE REVISION
exit 1
fi
DIRNAME=$(dirname $0)
TOPDIR=${DIRNAME}/../../
PACKAGINGDIR=${TOPDIR}/packaging
pushd ${PACKAGINGDIR} >/dev/null 2>&1
for f in $(find . -type f -name "*.tmpl"); do
f2=$(echo $f | sed s/.tmpl//g)
echo $f2
sed -e s/PVERSION/$VERSION/g \
-e s/PRELEASE/$RELEASE/g \
-e s/PREVISION/${REVISION}/g \
-e s/PRPMREV/${RPMREVISION}/g <$f >$f2
done
popd >/dev/null 2>&1