work-scripts/website-tools/htaccess-rename.sh
2018-02-10 16:27:53 -05:00

9 lines
423 B
Bash
Executable File

#!/bin/bash
#Benjamyn Love 2017
#finds and renames all .htaccess files to .htaccess.vipback (This name is to avoid clobbering client .htaccess backups)
#run in users home directory not anywhere else
#TODO add the homedir check if [[ "$PWD" == *"home/"?* ]]; then; echo 1; else echo 0; fi
if [[ "$PWD" == "/home"?* ]];then find . -name ".htaccess" -exec mv -v {} {}.vipback \;;else echo "Not in users home directory";fi