#!/bin/bash # # File: # dev/pack # # Description: # A shell script used to generate the source package with all the # Snap! Websites dependencies (which are all in one at this point.) # # Documentation: # This script is currently considered internal and is not directly # documented. It may be useful to you, although it is likely that # it won't be. # # License: # csspp -- a CSS Preprocessor # Copyright (c) 2015-2019 Made to Order Software Corp. All Rights Reserved # # https://snapwebsites.org/project/csspp # contact@m2osw.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # set -e SOURCE_REPO=../../../sources-repo if ! test -d $SOURCE_REPO then echo "To use this script, we expect you to have a directory named" echo "sources-repo, which is a pristine copy of the git repository." echo "Create that directory like any other git repository and place" echo "it in the parent of the csspp directory. The script will update" echo "the files on each run." exit 1 fi # Get both versions . dev/version DEBIAN_VERSION=`dpkg-parsechangelog --show-field Version | sed -e s/~.*// -e s/\.0$//` if test "$FULL_VERSION" != "$DEBIAN_VERSION" then echo "error: CMakeLists.txt says version $FULL_VERSION and the changelog" echo "error: says $DEBIAN_VERSION instead. Please fix and try again." exit 1; fi cd $SOURCE_REPO mkdir -p ../packages git pull origin master rm -f snapcmakemodules_*.tar.gz advgetopt_*.tar.gz csspp_*.tar.gz dpkg-source -b cmake cp snapcmakemodules_*.tar.gz ../packages cd contrib dpkg-source -b advgetopt dpkg-source -b csspp cp advgetopt_*.tar.gz csspp_*.tar.gz ../../packages cd ../.. rm -rf tmp/csspp mkdir -p tmp/csspp cd tmp/csspp tar xf ../../sources-repo/snapcmakemodules_*.tar.gz tar xf ../../sources-repo/contrib/advgetopt_*.tar.gz tar xf ../../sources-repo/contrib/csspp_*.tar.gz cp csspp/dev/MasterCMakeLists.txt CMakeLists.txt cp csspp/dev/INSTALL INSTALL cd csspp VERSION=`dpkg-parsechangelog --show-field Version` cd ../.. tar czf csspp_${VERSION}.tar.gz csspp cp csspp_${VERSION}.tar.gz ../packages/csspp-all_${VERSION}.tar.gz # Local Variables: # indent-tabs-mode: nil # tab-width: 4 # End: # vim: ts=4 sw=4 et