blob: 6b3425807560060ab057b723cd24baab3e2e9be4 (
plain)
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
|
#!/bin/sh
# Fetch cnf in build and export ssh config
if [ -z "$SSH_ORIGINAL_COMMAND" ]; then
cd "$(dirname "$(readlink -f "$0")")"
echo "Pull Laminar config"
git fetch --prune --force
git reset --hard origin/master
echo "Clean up and generate"
git clean -xdff
./generate.sh
echo "Deploy ssh configuration"
cp ssh/config ~/.ssh/config
cp ssh/authorized_keys ~/.ssh/authorized_keys
echo "Set crontab"
crontab crontab
else
echo "Laminar queue: $SSH_ORIGINAL_COMMAND"
LAMINAR_REASON="Git hook" laminarc queue "$SSH_ORIGINAL_COMMAND"
fi
|