Created
July 20, 2015 20:29
-
-
Save yeputons/2d3320b923c133c48e5d to your computer and use it in GitHub Desktop.
Asana/travis-cache-check clone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo: false | |
cache: | |
directories: | |
- cache1 | |
- cache2 | |
script: | |
- bash doit.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf cache* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for dir in cache{1,2}; do | |
if [ -d $dir ]; then | |
echo $dir - ok | |
else | |
echo $dir - creating | |
mkdir $dir | |
fi | |
file=$dir/file | |
if [ -e $file ]; then | |
echo $file - ok | |
else | |
echo $file - creating | |
touch $file | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment