Skip to content

Commit

Permalink
Feat: adding logic for copy
Browse files Browse the repository at this point in the history
adding if statement to check that file is there to avoid copy
  • Loading branch information
jackstockley89 committed Mar 11, 2022
1 parent 8935569 commit 8474203
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions environment-collection.bash
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#!bin/bash
#set -x
set -x

properties=~/properties
devfile=.development.txt
testfile=.testing.txt
preprodfile=.staging.txt
prodfile=.production.txt

cp -r properties ~
cp $properties/laaopsproperties.txt $properties/.laaopsproperties
if [ "${properties}/laaopsproperties.txt" == `ls ~/properties/laaopsproperties.txt` ]; then
echo -e "file already exists"
cp $properties/laaopsproperties.txt $properties/.laaopsproperties
else
cp -r properties ~
cp $properties/laaopsproperties.txt $properties/.laaopsproperties
fi

#collect a list of environments and place them in a text file
## DEV
Expand Down

0 comments on commit 8474203

Please sign in to comment.