Commit 8a3f7646 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add support for various unpacked subdir name

parent ca82bce9
......@@ -12,7 +12,7 @@ TDIR=$(mktemp -d)
fatal()
{
echo "$*" >&2
echo "FATAL: $*" >&2
echo "Removing $TDIR ..."
rm -rf $TDIR
exit 1
......@@ -27,8 +27,14 @@ cd $TDIR
erc $F
FD=$(basename $F .gz)
CWVERSION=$(echo $FD | sed -e "s|crossover-sources-\(.*\).tar|\1|") #"
WD=$TDIR/$FD/wine
test -d $WD || fatal
# try detect wine dir
WD=$TDIR/*/wine
if [ ! -d $WD ] ; then
WD=$TDIR/*/*/wine
[ -d $WD ] || fatal "can't find wine dir in $TDIR/**/wine"
fi
VERSION=$(cat $WD/VERSION | sed -e "s|^Wine version ||")
cd $CWDIR || fatal
......@@ -37,7 +43,7 @@ if git checkout bcw-$CWVERSION 2>/dev/null ; then
fatal "branch bcw-$CWVERSION already exists, skipping"
else
info "Checkouting branch bcw-$CWVERSION ..."
git checkout -b bcw-$CWVERSION wine-$VERSION || fatal
git checkout -b bcw-$CWVERSION wine-$VERSION || fatal "can't create new branch"
fi
commit_files()
......@@ -57,8 +63,9 @@ commit_files
info
info "Commit source to history branch"
info "Checkouting branch history ..."
git checkout history || fatal
git checkout history || fatal "can't checkout history"
commit_files
git tag cw-$CWVERSION
echo "Removing $TDIR ..."
rm -rf $TDIR
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment