File: deploydocs.sh

package info (click to toggle)
logdata-anomaly-miner 2.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,612 kB
  • sloc: python: 48,247; sh: 4,863; xml: 1,666; makefile: 23
file content (31 lines) | stat: -rwxr-xr-x 676 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/bash

BRANCH=$1
SOURCE=$2
DEST=$3

case $BRANCH in
	development)
		test -d $DEST/development && rm -rf $DEST/development
		cp -r $SOURCE $DEST/development
		;;
	main)
		VERSION=$(grep '__version__ =' source/root/usr/lib/logdata-anomaly-miner/metadata.py | awk -F '"' '{print $2}')
		if [ $(echo $VERSION | grep -P "\d+\.\d+\.\d+") ]
		then
		    test -d $DEST/$VERSION && rm -rf $DEST/$VERSION
		    cp -r $SOURCE $DEST/$VERSION
		    test -e $DEST/current && unlink $DEST/current
		    ln -s $DEST/$VERSION $DEST/current
		else
			echo "Unable to identify the aminer-version!"
			exit 1
		fi
		;;
	*)
		echo "usage: $0 main|development"
		exit 1
		;;
esac

exit 0