Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.4' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	build/debian/get-orig-source.sh
  • Loading branch information
eldy committed Sep 20, 2013
2 parents 0b09493 + 7a1efdb commit 0315cfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
29 changes: 6 additions & 23 deletions build/debian/get-orig-source.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# run with
# debian/get-orig-source.sh [x.y.z]
# Scan for new official sources and download file
# run with debian/get-orig-source.sh [x.y.z]

tmpdir=$(mktemp -d)
echo "tmpdir = $tmpdir"
Expand All @@ -13,28 +13,11 @@ uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_
cd $tmpdir

tgzfile=$(echo *.tgz)
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr_//; s/\.zip$//; s/_/./g; s/\+nmu1//; ')

# Extract the zip file
tar -xvf $tgzfile
srcdir=$(find . -maxdepth 1 -mindepth 1 -type d | sed -e 's/\.\///')

if [ ! -d "$srcdir" ]; then
echo "ERROR: Failed to identify the extracted directory in $tmpdir (got $srcdir)" >&2
rm -rf $tmpdir
exit 1
fi

# Repack as tar.xz
tar Jcf dolibarr_${version}.orig.tar.xz $srcdir
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr-//; s/\.tgz$//; s/_/./g; s/\+nmu1//; ')

cd - >/dev/null

if [ -e ../dolibarr_${version}.orig.tar.xz ]; then
echo "Not overwriting ../dolibarr_${version}.orig.tar.xz";
else
echo "Created ../dolibarr_${version}.orig.tar.xz"
mv $tmpdir/dolibarr_${version}.orig.tar.xz ../
fi
mv $tmpdir/dolibarr-${version}.tgz ../
echo "File ../dolibarr-${version}.tgz is ready for git-import"

#rm -rf $tmpdir
rm -rf $tmpdir
2 changes: 0 additions & 2 deletions build/tgz/tar_exclude.txt
Expand Up @@ -37,8 +37,6 @@ htdocs/customleave
htdocs/customgoogle
htdocs/document
htdocs/documents
htdocs/includes/ckeditor/_source
htdocs/includes/ckeditor/*_source.js
htdocs/includes/fckeditor/_samples
htdocs/includes/fckeditor/_testcases
htdocs/includes/nusoap/samples
Expand Down

0 comments on commit 0315cfd

Please sign in to comment.