File pre_checkin.sh of Package balsa

#!/bin/bash

CANONICAL_NAME=balsa
# Actually, this file is dummy. Touchscreen version does not work properly. (bgo#641735)
#VARIANTS=("" -touchscreen)

for VAR in "${VARIANTS[@]}" ; do
	NAME=$CANONICAL_NAME$VAR
	if test $NAME = $CANONICAL_NAME ; then
		continue
	fi
	if test $CANONICAL_NAME.spec -ot $NAME.spec ; then
		echo "$CANONICAL_NAME.spec is older than $NAME.spec. Please merge changes manually and call pre-checkin.sh again."
		exit 1
	fi
	if test $CANONICAL_NAME.changes -ot $NAME.changes ; then
		echo "$CANONICAL_NAME.changes is older than $NAME.changes. Please merge changes manually and call pre-checkin.sh again."
		exit 1
	fi
	sed "s/^Name: *$CANONICAL_NAME$/&$VAR/" <$CANONICAL_NAME.spec >$NAME.spec
	cp -a $CANONICAL_NAME.changes $NAME.changes
done
touch $CANONICAL_NAME.spec $CANONICAL_NAME.changes
openSUSE Build Service is sponsored by