forked from jlmcgraw/processFaaData
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
executable file
·28 lines (24 loc) · 842 Bytes
/
setup.sh
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
#!/bin/bash
set -eu # Always put this in Bourne shell scripts
IFS=$(printf '\n\t') # Always put this in Bourne shell scripts
#Install necessary software
sudo apt install \
git \
sqlite3 \
perltidy \
cpanminus \
carton \
libspatialite-dev \
spatialite-bin \
libsqlite3-mod-spatialite \
gdal-bin \
unzip
#Install the libraries in our cpanfile locally
carton install
#Setup hooks to run perltidy on git commit
cat > .git/hooks/pre-commit << 'EOF'
#!/bin/bash
find . -maxdepth 1 -type f -name '*.pl' -or -name '*.pm' | \
xargs -I{} -P0 sh -c 'perltidy -b -noll {}'
EOF
chmod +x .git/hooks/pre-commit