X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=makedist.sh;h=3539723e764c10efa858da451845f379b6a273f8;hb=092556fd403b1464402c741f949c48f04f628ee8;hp=72b7827d35dfc6095626a95efbf89fbda57c9a75;hpb=9aa7909e583ee203065b37d75169cb1dcbfcdf12;p=supertux.git diff --git a/makedist.sh b/makedist.sh index 72b7827d3..3539723e7 100755 --- a/makedist.sh +++ b/makedist.sh @@ -1,17 +1,37 @@ #!/bin/sh -DISTDIR="supertux-0.3.x" -rm -rf $DISTDIR -mkdir $DISTDIR -cp "CMakeLists.txt" "COPYING" "INSTALL" "Jamconfig.in" "Jamfile" "Jamrules" "README" "WHATSNEW.txt" "autogen.sh" "config.h.in" "configure" "configure.ac" "config.h.cmake" "makedist.sh" "makepot.sh" "supertux2.desktop" $DISTDIR -cp --parents mk/autoconf/*.m4 mk/autoconf/config.guess mk/autoconf/config.sub mk/autoconf/install-sh $DISTDIR -cp --parents mk/jam/*.jam $DISTDIR + +ST_VERSION=`grep '^SET(SUPERTUX_VERSION' CMakeLists.txt | sed -e 's/SET(SUPERTUX_VERSION "\([^"]\+\)")/\1/'` +DISTDIR="supertux-$ST_VERSION" + +if test -e "$DISTDIR" +then + echo "$DISTDIR already exists." + exit 1 +fi + +echo "Creating directory $DISTDIR" +mkdir "$DISTDIR" || exit 1 + +cp "CMakeLists.txt" "COPYING" "INSTALL.md" "README.md" "WHATSNEW.txt" "config.h.cmake" "makedist.sh" "makepot.sh" "supertux2.desktop" $DISTDIR cp --parents mk/cmake/*.cmake $DISTDIR cp --parents mk/msvc/* $DISTDIR -find contrib -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune -find data -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune -find docs -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune -find man -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune -find src -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune -find tools -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune + +echo "Copying files:" +for DIR in contrib data docs man src tools external +do + echo -n " $DIR ... " + find "$DIR" -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune + echo "done" +done + +echo -n "Creating $DISTDIR.tar.gz ... " tar czf $DISTDIR.tar.gz $DISTDIR +echo "done" + +echo -n "Creating $DISTDIR.tar.bz2 ... " tar cjf $DISTDIR.tar.bz2 $DISTDIR +echo "done" + +echo -n "Removing $DISTDIR ... " +rm -rf $DISTDIR +echo "done"