-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.release
executable file
·34 lines (25 loc) · 1.07 KB
/
build.release
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
#!/bin/bash
# Set the version to match the repository tag in Mercurial... OMIT THE "v"!!
VERSION=$1
# First make all the required directories
mkdir -p ./releases/imcom_v${VERSION}/
mkdir -p ./releases/imcom_v${VERSION}/src/
mkdir -p ./releases/imcom_v${VERSION}/example/
mkdir -p ./releases/imcom_v${VERSION}/idl/
# Then copy the source code and a generic Makefile
cp ./*.f90 ./releases/imcom_v${VERSION}/src/
cp ./releases/generic_Makefile ./releases/imcom_v${VERSION}/src/Makefile
# Then copy the example files and IDL scripts over
cp -r ./example/* ./releases/imcom_v${VERSION}/example/
cp -r ./idl/* ./releases/imcom_v${VERSION}/idl/
# Then copy the README
cp ./releases/README ./releases/imcom_v${VERSION}/
# Then make a copy of the documentation
cp ./imcom_documentation.pdf ./releases/imcom_v${VERSION}/
# Then make a copy of the GNU license
cp ./gnu_public_license-3.0.txt ./releases/imcom_v${VERSION}/
# Then, finally, tar up a version in the ./releases/ directory
rm -f ./releases/imcom_v${VERSION}.tar.gz
cd releases
tar cvfz imcom_v${VERSION}.tar.gz ./imcom_v${VERSION}/*
cd ..