be more scrupulous about testing before touching

This commit is contained in:
Ryan Delaney 2014-06-23 15:43:52 -07:00
parent a8f788897a
commit d322496b9e
1 changed files with 11 additions and 11 deletions

View File

@ -83,32 +83,32 @@ if [[ ! -d "./test" ]]; then mkdir test || exit 1; fi
cd test || exit 1 cd test || exit 1
# File # File
touch FILE if [[ ! -f FILE ]]; then touch FILE; fi
# Executable file # Executable file
touch EXECUTABLE if [[ ! -f EXECUTABLE ]]; then touch EXECUTABLE; fi
chmod +x EXECUTABLE chmod +x EXECUTABLE
# Symlink # Symlink
ln -s FILE SYMLINK if [[ ! -f SYMLINK ]]; then ln -s FILE SYMLINK; fi
# Directory # Directory
mkdir DIRECTORY if [[ ! -d DIRECTORY ]]; then mkdir DIRECTORY; fi
# Directory symlink # Directory symlink
ln -s DIRECTORY DIR-SYMLINK if [[ ! -d DIR-SYMLINK ]]; then ln -s DIRECTORY DIR-SYMLINK; fi
# Hardlink # Hardlink
touch HARDLINK1 if [[ ! -f HARDLINK1 ]]; then touch HARDLINK1; fi
ln HARDLINK1 HARDLINK2 if [[ ! -f HARDLINK2 ]]; then ln HARDLINK1 HARDLINK2; fi
# Create a link to nowhere # Create a link to nowhere
touch nothing if [[ ! -f nothing ]]; then touch nothing; fi
ln -s nothing ORPHAN if [[ ! -f ORPHAN ]]; then ln -s nothing ORPHAN; fi
rm nothing if [[ -f nothing ]]; then rm nothing; fi
# World-writable # World-writable
touch WORLDWRITEABLE if [[ ! -f WORLDWRITEABLE ]]; then touch WORLDWRITEABLE; fi
chmod 0777 WORLDWRITEABLE chmod 0777 WORLDWRITEABLE
# Supported extensions # Supported extensions