makedist.sh 983 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. ST_VERSION=`git describe --tags | sed 's/^v//' | awk -F- '{print $1;}'`
  3. DISTDIR="supertux-$ST_VERSION"
  4. if test -e "$DISTDIR"
  5. then
  6. echo "$DISTDIR already exists."
  7. exit 1
  8. fi
  9. echo "Creating directory $DISTDIR"
  10. mkdir "$DISTDIR" || exit 1
  11. cp "CMakeLists.txt" "LICENSE.txt" "INSTALL.md" "README.md" "NEWS.md" "config.h.cmake" "makedist.sh" "makepot.sh" "supertux2.appdata.xml" "supertux2.desktop" "version.cmake" "version.cmake.in" "version.h.in" $DISTDIR
  12. cp --parents mk/cmake/*.cmake $DISTDIR
  13. cp --parents mk/msvc/* $DISTDIR
  14. echo "Copying files:"
  15. for DIR in contrib data docs man src tools external tests
  16. do
  17. echo -n " $DIR ... "
  18. find "$DIR" -type f -exec "cp" "--parents" "{}" "$DISTDIR" ";" -o -name .svn -prune
  19. echo "done"
  20. done
  21. echo -n "Creating $DISTDIR.tar.gz ... "
  22. tar czf $DISTDIR.tar.gz $DISTDIR
  23. echo "done"
  24. echo -n "Creating $DISTDIR.tar.bz2 ... "
  25. tar cjf $DISTDIR.tar.bz2 $DISTDIR
  26. echo "done"
  27. echo -n "Removing $DISTDIR ... "
  28. rm -rf $DISTDIR
  29. echo "done"