diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ffaefa..a2bc76c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,10 +44,10 @@ jobs: host: ${{ secrets.DC_HOST }} user: ${{ secrets.DC_USER }} pass: ${{ secrets.DC_PASS }} - scp: | + scp: |- ./test/test1* => /home/github/test/test1/ ./test/test*.csv => "/home/github/test/test2/" - last_ssh: | + last_ssh: |- echo $LASTSSH ls -la @@ -59,5 +59,5 @@ jobs: host: ${{ secrets.DC_HOST }} user: ${{ secrets.DC_USER }} pass: ${{ secrets.DC_PASS }} - scp: | + scp: |- './test/*' => /home/github/test/ \ No newline at end of file diff --git a/ab b/ab new file mode 100644 index 0000000..48f0d0e --- /dev/null +++ b/ab @@ -0,0 +1 @@ +a bc = cd diff --git a/entrypoint.sh b/entrypoint.sh index 0c6b2cb..43664c5 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -32,10 +32,14 @@ executeSSH() { # evaluate each line against all environment variables while IFS= read -r LINE; do LINE=$(echo $LINE) + if [[ -z "${LINE}" ]]; then + continue + fi COMBINE="&&" - LASTCOMBINE="&&" + LASTCOMBINE="" if [[ $LINE =~ ^.*\&\&$ ]]; then LINE="$LINE true" + LASTCOMBINE="&&" elif [[ $LINE =~ ^\&\&.*$ ]]; then LINE="true $LINE" elif [[ $LINE =~ ^.*\|\|$ ]]; then @@ -46,6 +50,9 @@ executeSSH() { COMBINE="||" fi LINE=$(eval 'echo "$LINE"') + if ! [[ $LINE =~ ^\(.*\)$ ]]; then + LINE=$(eval echo "$LINE") + fi LINE="$LINE $LASTCOMBINE" if [ -z "$COMMANDS" ]; then