slackbuilds/xap/zbar/get_sources.sh
Michal Cieslakiewicz 9f880daf3f xap/zbar: scripts updated.
get_source.sh script updated.
Autoconf patch removed as it is no longer needed.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2021-02-18 15:09:48 +01:00

9 lines
446 B
Bash
Executable File

#!/bin/bash
SRC=zbar
BRANCH=master
git clone -b $BRANCH --depth 1 https://github.com/mchehab/${SRC}.git $SRC
VERSION=$(sed -e 's/\[/ /g' -e 's/\]/ /g' -e 's/,/ /g' -e 's/(/ /g' $SRC/configure.ac | awk -v DATE=$(date '+%Y%m%d') '$1=="AC_INIT" && $2=="zbar" { printf "%s_%sgit\n", $(NF-2), DATE }')
mv $SRC ${SRC}-${VERSION}
tar cf - ${SRC}-${VERSION} | xz -c9 > ${SRC}-${VERSION}.tar.xz
[ -s ${SRC}-${VERSION}.tar.xz ] && rm -rf ${SRC}-${VERSION}