File tree Expand file tree Collapse file tree 14 files changed +174
-36
lines changed Expand file tree Collapse file tree 14 files changed +174
-36
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ USER_ID=$( id -u) GROUP_ID=$( id -g) docker-compose build dev
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ PARENT_DIR=" $( cd " $( dirname " $0 " ) " && cd .. && pwd) "
4+
5+ cp " $PARENT_DIR /docker/Dockerfile.dev" " $PARENT_DIR /docker/Dockerfile.dev.bkp"
6+
7+ echo -e " \nRUN $* " >> " $PARENT_DIR /docker/Dockerfile.dev"
8+
9+ if USER_ID=$( id -u) GROUP_ID=$( id -g) docker-compose build dev; then
10+ rm -f " $PARENT_DIR /docker/Dockerfile.dev.bkp"
11+ else
12+ mv " $PARENT_DIR /docker/Dockerfile.dev.bkp" " $PARENT_DIR /docker/Dockerfile.dev"
13+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ docker-compose down -v
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
4+
5+ export PATH=" $PATH :$DIR "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
4+
5+ if [[ $1 == --root ]] ; then
6+ runner=" \$ DIR/run --root"
7+ name=$2
8+ shift 2
9+ else
10+ runner=" \$ DIR/run"
11+ name=$1
12+ shift 1
13+ fi
14+
15+ cat > " $DIR /$name " << EOL
16+ #!/bin/bash
17+
18+ DIR="\$ (cd "\$ (dirname "\$ 0")" && pwd)"
19+
20+ . "$runner " $@ "\$ @"
21+ EOL
22+
23+ chmod +x " $DIR /$name "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ PARENT_DIR=" $( cd " $( dirname " $0 " ) " && cd .. && pwd) "
4+
5+ TARGET_DIR=" $1 "
6+
7+ mv " $PARENT_DIR /README.md" " $PARENT_DIR /INSTRUCTIONS.md" 2> /dev/null
8+
9+ (shopt -s dotglob; mv " $PARENT_DIR /$TARGET_DIR " /* " $PARENT_DIR " )
10+
11+ rm -r " ${PARENT_DIR:? } /$TARGET_DIR "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
4+
5+ . " $DIR /run" npm " $@ "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
4+
5+ . " $DIR /run" npx " $@ "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ user=" "
4+
5+ if [[ $1 == --root ]] ; then
6+ user=" --user root"
7+ shift 1
8+ fi
9+
10+ if docker-compose ps -a | grep -E -i -q ' app(\s*)running' ; then
11+ USER_ID=$( id -u) GROUP_ID=$( id -g) docker-compose --profile dev exec $user dev " $@ "
12+ else
13+ USER_ID=$( id -u) GROUP_ID=$( id -g) docker-compose --profile dev run --rm $user --service-ports dev " $@ "
14+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
4+
5+ if [[ $1 == --root ]] ; then
6+ shift
7+ . " $DIR /run" --root /bin/ash " $@ "
8+ else
9+ . " $DIR /run" /bin/ash " $@ "
10+ fi
You can’t perform that action at this time.
0 commit comments