You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
441 B
21 lines
441 B
6 years ago
|
#!/bin/bash
|
||
8 years ago
|
|
||
6 years ago
|
DOCKER_CONFIG_DIRECTORY="/home/jonathan/.dotfiles/docker/web/"
|
||
8 years ago
|
|
||
6 years ago
|
if [ ! -z "$1" ]; then
|
||
8 years ago
|
|
||
6 years ago
|
version="$1"
|
||
7 years ago
|
|
||
6 years ago
|
if [ "$(whoami)" == "root" ]; then
|
||
|
cd "$DOCKER_CONFIG_DIRECTORY"
|
||
|
docker-compose down
|
||
|
sed "s/%version%/$version/" php/Dockerfile.sample > php/Dockerfile
|
||
|
docker-compose up --build -d
|
||
|
else
|
||
|
gksudo $0 "$version"
|
||
|
fi
|
||
|
else
|
||
|
version="$(echo -e "5.6\n7.0\n7.1\n7.2\n7.3" | rofi -dmenu -p "PHP Version")"
|
||
|
$0 "$version"
|
||
|
fi
|