Raspberry Pi GPIO Web Control / src / main / resources / script / createTgz.sh

Sebastian Bub a873bf5 















































#!/bin/bash

# Copyright 2012 der-bub.de
# http://www.der-bub.de
# Author: Sebastian Bub (sebastian@der-bub.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

OLDDIR=`pwd`
DIR=`dirname "$0"`

cd "${DIR}"
VERSION=`LC_ALL=en_US hg summary| grep parent | awk '{print $2}'| sed 's/.*://'`
export VERSION
echo creating tgz for version $VERSION
echo
cd -

# (I know that you might get in trouble if project directory is sym linked
cd "${DIR}/../../../../.."

echo "This is version $VERSION of project https://bitbucket.org/sbub/raspberry-pi-gpio-web-control" >  raspberry-pi-gpio-web-control/VERSION

tar czvf raspberry-pi-gpio-web-control-${VERSION}.tgz \
    raspberry-pi-gpio-web-control/VERSION \
    raspberry-pi-gpio-web-control/README.md \
    raspberry-pi-gpio-web-control/cron.conf.MAY_BE_CHANGED \
    raspberry-pi-gpio-web-control/gpio.conf.MUST_BE_CHANGED \
    raspberry-pi-gpio-web-control/log4j.properties \
    raspberry-pi-gpio-web-control/logs/_doNotDelete \
    raspberry-pi-gpio-web-control/src/main/resources/init.d/gpio-winstone \
    raspberry-pi-gpio-web-control/start.sh \
    raspberry-pi-gpio-web-control/stop.sh \
    raspberry-pi-gpio-web-control/target/raspberry-pi-gpio-web-control-1.0-SNAPSHOT.war

rm raspberry-pi-gpio-web-control/VERSION

cd "$OLDDIR"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.