forked from wavebitscientific/datetime-fortran
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkdist.sh
More file actions
executable file
·28 lines (24 loc) · 815 Bytes
/
mkdist.sh
File metadata and controls
executable file
·28 lines (24 loc) · 815 Bytes
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
#!/usr/bin/env bash
echo "Running mkdist.sh"
echo
# set some colour coding
# http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
# Extra checks on the integrity of packaging
echo "Checking versioning consistency"
vers_conf=$(grep AC_INIT configure.ac | sed -e 's/^.*\[//g' | sed -e 's/\])//')
echo "configure.ac reports version: '$vers_conf'"
vers_src=$(grep Version src/lib/datetime.f90 | sed -e 's/! Version: *//')
echo "datetime.f90 reports version: '$vers_src'"
if [[ "$vers_conf" == "$vers_src" ]]
then
echo "${green}Pass${reset}"
echo "Remember to tag the repo"
else
echo "${red}FAIL${reset}: Versions do not match. Aborting"
exit 1
fi
echo
#echo "Do 'make distcheck' for final sanity check"