-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcleanup
More file actions
executable file
·27 lines (22 loc) · 827 Bytes
/
cleanup
File metadata and controls
executable file
·27 lines (22 loc) · 827 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
#!/usr/bin/env sh
rm -fr src/*.o src/*.so autom4te.cache config.log config.status inst
RLIBKRIGING_PATH="src/libK/bindings/R/rlibkriging"
# sync Version number & date (only if submodules are initialized)
if [ -f "$RLIBKRIGING_PATH/DESCRIPTION" ]; then
VERSION=`grep "Version:" $RLIBKRIGING_PATH/DESCRIPTION`
# update Version only if not the same[+patch]
if ! grep -q "$VERSION" DESCRIPTION; then
sed -i.bak "s/Version:.*/$VERSION/g" DESCRIPTION
fi
DATE=`date '+%Y-%m-%d'`
sed -i.bak "s/Date:.*/Date: $DATE/g" DESCRIPTION
rm -f DESCRIPTION.bak
fi
rm -rf src/libK/build
# It is required that setup.sh is run before R CMD build rlibkriging when submit to CRAN.
if [ ! -d R ]; then
echo "R directory does not exist, running setup.sh"
tools/setup.sh
else
echo "R directory exists, skipping setup.sh"
fi