forked from mbadolato/iTerm2-Color-Schemes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-all.sh
More file actions
executable file
·25 lines (24 loc) · 803 Bytes
/
generate-all.sh
File metadata and controls
executable file
·25 lines (24 loc) · 803 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
#!/bin/bash -e
IMAGE='itermcolors:latest'
COMMANDS=$( cat <<COMMANDS
cd tools
./gen.py
python -m screenshot_gen
python ./generate_screenshots_readme.py
COMMANDS
)
if [[ $PWD == /colors ]] ; then # we are inside the container
eval "$COMMANDS"
else # we have to start the container
if [[ -z "$(docker images -q "$IMAGE" 2> /dev/null )" ]] ; then # create the image
docker build -t "$IMAGE" .
fi
if [[ $1 == debug ]] ; then # We want to debug
# Show the commands which would be run automatically
echo ">>> Debug. These commands would be run:"
echo "$COMMANDS"
echo
exec docker run --rm -v "$PWD":/colors -w /colors -it "$IMAGE"
fi
exec docker run --rm -v "$PWD":/colors -w /colors "$IMAGE" /colors/generate-all.sh
fi