From 5df4d5c0d598e8e66ee041c22d243ff364866f4c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 12 Mar 2026 11:00:50 +0100 Subject: drop pear/pecl dependency sources from github --- makesrc.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 makesrc.sh (limited to 'makesrc.sh') diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..3f387cf --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global gh_vend/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global gh_proj/{s/.* //;p}' $NAME.spec) +VER1=$(sed -n '/^%global upstream_version/{s/.* //;p}' $NAME.spec) +VER2=$(sed -n '/^%global upstream_prever/{s/.* //;p}' $NAME.spec) + +VERSION=${VER1}${VER2} + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + +if [ -f $PROJECT-$VERSION.tgz ]; then + echo $PROJECT-$VERSION.tgz already present + exit 1 +fi + +echo "Cloning..." +rm -rf $PROJECT-$VERSION +git clone --recursive https://github.com/$OWNER/$PROJECT.git -b $VERSION $PROJECT-$VERSION + +echo "Composer..." +pushd $PROJECT-$VERSION + cp composer.json .. +popd + +echo "Archiving..." +tar czf $PROJECT-$VERSION.tgz --exclude-vcs $PROJECT-$VERSION + +echo "Cleaning..." +rm -rf $PROJECT-$VERSION + +echo "Done." -- cgit