Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTomas Mlcoch <tmlcoch@redhat.com>2013-08-05 11:45:22 +0400
committerTomas Mlcoch <tmlcoch@redhat.com>2013-08-05 11:45:22 +0400
commite5984293032755f06424dfee4149e3db315b33d7 (patch)
tree6a59f64b94e258e47fa073026a9aa87887bb95fb /utils
parentefa0fea0bd3f6aa06ce5c6b99bde0d1b9145fcad (diff)
Update utils scripts0.2.0
Diffstat (limited to 'utils')
-rwxr-xr-xutils/make_rpm.sh4
-rwxr-xr-xutils/make_tarball.sh18
2 files changed, 5 insertions, 17 deletions
diff --git a/utils/make_rpm.sh b/utils/make_rpm.sh
index 53734b5..83a16ac 100755
--- a/utils/make_rpm.sh
+++ b/utils/make_rpm.sh
@@ -5,7 +5,7 @@ BUILD_DIR="$RPMBUILD_DIR/BUILD"
TARGETDIR=`pwd -P`
SCRIPTDIR=$( cd "$(dirname "$0")" ; pwd -P )
PROJECTROOTDIR=`realpath "$SCRIPTDIR/../"`
-GITREV=""
+GITREV=`git rev-parse --short HEAD`
echo "Cleaning $BUILD_DIR"
rm -rf $BUILD_DIR
@@ -38,7 +38,7 @@ fi
echo "Tarball done"
echo "> Copying tarball and .spec file into the $RPMBUILD_DIR .."
-cp createrepo_c-*.tar.xz $RPMBUILD_DIR/SOURCES/
+cp createrepo_c-$GITREV.tar.xz $RPMBUILD_DIR/SOURCES/
if [ ! $? == "0" ]; then
echo "Error while: cp createrepo_c-*.tar.xz $RPMBUILD_DIR/SOURCES/"
exit 1
diff --git a/utils/make_tarball.sh b/utils/make_tarball.sh
index 310d7fd..d8af6d6 100755
--- a/utils/make_tarball.sh
+++ b/utils/make_tarball.sh
@@ -1,23 +1,11 @@
-#!/usr/bin/bash
-
-TARGETDIR=`pwd -P`
-SCRIPTDIR=$( cd "$(dirname "$0")" ; pwd -P )
-PROJECTROOTDIR=`realpath "$SCRIPTDIR/../"`
-
-if [ "$#" -eq "1" ] && [ "$1" = "-h" ]; then
- echo "Usage: `basename $0` [git revision]"
- exit 0
-fi
+TARGET_DIR="./"
if [ "$#" -eq "0" ]; then
GITREV=`git rev-parse --short HEAD`
- SUFFIX=`$SCRIPTDIR/get_version.py $PROJECTROOTDIR`
else
GITREV=$1
- SUFFIX=$GITREV
fi
-echo "Generate tarball for revision/version: $SUFFIX (project root dir: $PROJECTROOTDIR)"
+echo "Generate tarball for revision: $GITREV"
-cd ${PROJECTROOTDIR}
-git archive ${GITREV} --prefix="createrepo_c-${SUFFIX}/" | xz > $TARGETDIR/createrepo_c-${SUFFIX}.tar.xz
+git archive ${GITREV} --prefix=createrepo_c/ | xz > $TARGET_DIR/createrepo_c-${GITREV}.tar.xz