Skip to content

Commit

Permalink
Moved check for empty directory to top of scripts (#1143)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Shust <mark@shust.com>
Co-authored-by: Michael Lehmkuhl <michael@electricpulp.com>
Co-authored-by: Tu Van <vandinhtuit@gmail.com>
Co-authored-by: Cid Lopes <alannettto@gmail.com>
  • Loading branch information
5 people authored Apr 27, 2024
1 parent 3f5c1b8 commit 5891bf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compose/bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

bin/stop

if [ -d "./src" ]; then
echo "Error: The \"src\" directory is not empty. Please remove all contents within this directory and try again."
exit 1
fi

bin/stop

bin/start --no-dev
[ $? != 0 ] && echo "Failed to start Docker services" && exit

Expand Down
9 changes: 5 additions & 4 deletions lib/template
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/usr/bin/env bash
git init -qqq
git remote add origin https://github.com/markshust/docker-magento
git fetch origin -qqq
git checkout origin/master -- compose

if [ -d "./bin" ]; then
echo "Error: The current directory is not empty. Please remove all contents within this directory and try again."
exit 1
fi

git init -qqq
git remote add origin https://github.com/markshust/docker-magento
git fetch origin -qqq
git checkout origin/master -- compose

mv compose/* ./
mv compose/.gitignore ./
mv compose/.vscode ./
Expand Down

0 comments on commit 5891bf5

Please sign in to comment.