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) ...@@ -12,7 +12,7 @@ TDIR=$(mktemp -d)
fatal() fatal()
{ {
echo "$*" >&2 echo "FATAL: $*" >&2
echo "Removing $TDIR ..." echo "Removing $TDIR ..."
rm -rf $TDIR rm -rf $TDIR
exit 1 exit 1
...@@ -27,8 +27,14 @@ cd $TDIR ...@@ -27,8 +27,14 @@ cd $TDIR
erc $F erc $F
FD=$(basename $F .gz) FD=$(basename $F .gz)
CWVERSION=$(echo $FD | sed -e "s|crossover-sources-\(.*\).tar|\1|") #" 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 ||") VERSION=$(cat $WD/VERSION | sed -e "s|^Wine version ||")
cd $CWDIR || fatal cd $CWDIR || fatal
...@@ -37,7 +43,7 @@ if git checkout bcw-$CWVERSION 2>/dev/null ; then ...@@ -37,7 +43,7 @@ if git checkout bcw-$CWVERSION 2>/dev/null ; then
fatal "branch bcw-$CWVERSION already exists, skipping" fatal "branch bcw-$CWVERSION already exists, skipping"
else else
info "Checkouting branch bcw-$CWVERSION ..." 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 fi
commit_files() commit_files()
...@@ -57,8 +63,9 @@ commit_files ...@@ -57,8 +63,9 @@ commit_files
info info
info "Commit source to history branch" info "Commit source to history branch"
info "Checkouting branch history ..." info "Checkouting branch history ..."
git checkout history || fatal git checkout history || fatal "can't checkout history"
commit_files commit_files
git tag cw-$CWVERSION git tag cw-$CWVERSION
echo "Removing $TDIR ..."
rm -rf $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