File: repackage.sh

package info (click to toggle)
mcollective 2.6.0+dfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,480 kB
  • ctags: 1,164
  • sloc: ruby: 9,588; sh: 652; xml: 468; python: 181; makefile: 161; perl: 127; php: 46
file content (40 lines) | stat: -rwxr-xr-x 1,175 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

TARARCHIVE=$1
CURDIR=$(pwd)

if [ -z ${TARARCHIVE} ]; then
	echo "Please supply filename to mcollective archive"
	exit 1
fi

if [ ! -f ${TARARCHIVE} ]; then
	echo "Could not find ${TARARCHIVE}"
	exit 1
fi

TEMP_DIR=$(mktemp -d)

MC_VERSION=$(echo ${TARARCHIVE} | sed -e 's@.*-@@' -e 's@.tar.gz@@')

echo "Found Mcollective Version ${MC_VERSION}"

tar xvfz ${TARARCHIVE} -C ${TEMP_DIR}/

# strip included vendor stuff
rm -rf ${TEMP_DIR}/mcollective-${MC_VERSION}/lib/mcollective/vendor/json
rm -rf ${TEMP_DIR}/mcollective-${MC_VERSION}/lib/mcollective/vendor/systemu
rm -rf ${TEMP_DIR}/mcollective-${MC_VERSION}/lib/mcollective/vendor/load_json.rb
rm -rf ${TEMP_DIR}/mcollective-${MC_VERSION}/lib/mcollective/vendor/load_systemu.rb

# strip included stuff to build ActiveMQ rpm package
rm -rf ${TEMP_DIR}/mcollective-${MC_VERSION}/ext/activemq/wlcg-patch.tgz
rm -rf ${TEMP_DIR}/mcollective-${MC_VERSION}/ext/activemq/apache-activemq.spec

# strip includes javascript files
rm -rf ${TEMP_DIR}/mcollective-${MC_VERSION}/doc/js

cd ${TEMP_DIR}
tar cvz mcollective-${MC_VERSION} -f ${CURDIR}/mcollective_${MC_VERSION}+dfsg.orig.tar.gz
cd ${CURDIR}
rm -rf ${TEMP_DIR}