LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File create-source-archive.sh of Package compton-conf (Project home:Warhammer40k:stuff)

#!/bin/bash
#

name="compton-conf"
url="https://github.com/lxde/compton-conf.git"

checkout="$1"
test "z$checkout" = "z" && checkout="master"

name="$name-git.$checkout"

script_dir="$( cd "$( dirname "$0" )" && pwd )"

olddir="$PWD"

check_errors () {
 local status="$?"
 if [ "$status" != "0" ]; then
  echo "ERROR: script failed!"
  exit 1
 fi
}

cd "$script_dir"
check_errors

git clone "$url" "$name"
check_errors

cd $name
check_errors

if [ "$checkout" != "master" ]; then
 git checkout "$checkout"
 check_errors
fi

git submodule update --init
check_errors

rm -rf .git
check_errors

rm -f .gitattributes
check_errors

rm -f .gitignore
check_errors

rm -f .gitmodules
check_errors

cd translations
check_errors

git init
check_errors

git pull --depth=1 "https://github.com/lxde/lxqt-l10n.git"
check_errors

git repack -a -d
check_errors

cd ..
check_errors

cd ..
check_errors

tar cf "$name.tar" "$name" --owner=0 --group=0
check_errors

bzip2 -9 "$name.tar"
check_errors

rm -rf "$name"
check_errors

cd "$olddir"
check_errors