-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbootstrap.sh
More file actions
29 lines (28 loc) · 1.14 KB
/
bootstrap.sh
File metadata and controls
29 lines (28 loc) · 1.14 KB
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
29
#!/bin/bash
# This small script will bootstrap the new worker code.
echo "Please answer the below question to bootstrap your initial worker code."
echo
echo -n "Workername? "
read workername
echo -n "Your name? "
read yourname
echo -n "Your email address? "
read youremail
echo -n "A short one line description of the worker? "
read onelinedescription
# OS platform detection
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sed -i "s/TEMPLATEWORKERNAME/$workername/g" pyproject.toml
sed -i "s/TEMPLATENAME/$yourname/g" pyproject.toml
sed -i "s/TEMPLATEEMAIL/$youremail/g" pyproject.toml
sed -i "s/TEMPLATEWORKERNAME/$workername/g" src/tasks.py
sed -i "s/TEMPLATEDESC/$onelinedescription/g" src/tasks.py
sed -i "s/TEMPLATEWORKERNAME/$workername/g" README.md
elif [[ "$OSTYPE" == "darwin"* ]]; then
sed -i "" "s/TEMPLATEWORKERNAME/$workername/g" pyproject.toml
sed -i "" "s/TEMPLATENAME/$yourname/g" pyproject.toml
sed -i "" "s/TEMPLATEEMAIL/$youremail/g" pyproject.toml
sed -i "" "s/TEMPLATEWORKERNAME/$workername/g" src/tasks.py
sed -i "" "s/TEMPLATEDESC/$onelinedescription/g" src/tasks.py
sed -i "" "s/TEMPLATEWORKERNAME/$workername/g" README.md
fi