forked from flyingcircusio/batou
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap
23 lines (21 loc) · 825 Bytes
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
{ # prevent execution of partial downloads.
set -e
oops() {
echo "$0:" "$@" >&2
exit 1
}
curl -sL https://raw.githubusercontent.com/flyingcircusio/batou/master/appenv.py -o appenv || oops "failed to download appenv"
chmod +x appenv
ln -sf appenv batou
# This code path also covers upgrading from batou 1.x but doesn't
echo "batou>=2.0b12" >> requirements.txt
sed -e 's!.*batou_ext.*!batou_ext @ https://github.com/flyingcircusio/batou_ext/archive/f2d1ce75a15eeaf4701686bb64e6616c5c35e31c.zip#sha256=4242d65a4cb0721812a308d2cfa87d647ba78f3e03ae4d189f9d2ac78157df93!' requirements.txt > requirements.txt.new
mv requirements.txt.new requirements.txt
./appenv update-lockfile
./batou --help
if [ -d ".git" ]; then
echo '.batou' >> .gitignore
git add .gitignore requirements.txt requirements.lock batou
fi
}