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.
31 lines
837 B
31 lines
837 B
#!/bin/bash
|
|
|
|
repository="git@github.com:lxde/obconf-qt"
|
|
target_dir="snapshot"
|
|
|
|
ls | grep -v "debian" | xargs rm -r
|
|
rm -rf .pc
|
|
|
|
if [ -f debian/commit ]; then
|
|
source debian/commit
|
|
[ ! -z "${branch}" ] && echo "branch: ${branch}"
|
|
[ ! -z "${commit}" ] && echo "commit: ${commit}"
|
|
[ ! -z "${target_dir}" ] && echo "target_dir: ${target_dir}"
|
|
fi
|
|
|
|
snapdir=$(mktemp -d)
|
|
echo "$snapdir"
|
|
pushd "$snapdir"
|
|
echo "git clone ${branch} ${repository} ${target_dir}"
|
|
git clone ${branch} ${repository} ${target_dir}
|
|
pushd snapshot
|
|
[ ! -z "${commit}" ] && git reset --hard "${commit}"
|
|
description=$(git describe --tags)
|
|
rm -rf .git*
|
|
popd
|
|
tar cfvJ snapshot.orig.tar.xz snapshot
|
|
popd
|
|
tar xf "$snapdir/snapshot.orig.tar.xz" --strip-components 1
|
|
dch "New snapshot: $description"
|
|
rm -rfv "$snapdir"
|