Skip to content

Commit f0b2a6b

Browse files
committed
feat: new install test
- Added run-test-install.sh script for testing install process; - Refactored `onlinesetup` script;
1 parent bf53ad6 commit f0b2a6b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

bin/onlinesetup

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
REPO=${1:-https://github.com/OleksiiBulba/php-dockerizer}
44
VERSION=${2:-origin/master}
5-
INSTALL_DIR=${3:-dockerizer}
5+
INSTALL_ROOT=${3:-./}
6+
INSTALL_DIR=${4:-dockerizer}
67

7-
mkdir $INSTALL_DIR; cd ./$INSTALL_DIR
8+
INSTALL_ROOT=$(realpath $INSTALL_ROOT)
9+
10+
CURRENT_DIR=$(pwd)
11+
cd $INSTALL_ROOT; mkdir $INSTALL_DIR; cd ./$INSTALL_DIR
812

913
git init -qqq
1014
git remote add origin $REPO
@@ -17,3 +21,4 @@ shopt -s dotglob
1721
mv ./src/* ../
1822
$PREV_DOTGLOB
1923
cd ../; rm -rf ./$INSTALL_DIR
24+
cd $CURRENT_DIR

tests/run-test-install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
4+
curl -s https://raw.githubusercontent.com/OleksiiBulba/php-dockerizer/master/bin/onlinesetup | bash -s -- https://github.com/OleksiiBulba/php-dockerizer $branch dockerizer

0 commit comments

Comments
 (0)