chmod +x on the script folder

A handful of my Rails apps were created in a Windows development environment… Which means that the files in the script directory do not have the +x permission, which means I have to type ruby script/console instead of just script/console… SVN doesn’t see adding the execute permission to a file as being a change, so you can’t commit it by simply changing the permissions… So I wrote a script to copy the script folder, delete it, check it in, restore it, add execute permission, and check it back in. Ahh, I don’t have to type ruby anymore!

svn export script script2
svn delete script
svn commit -m "temporarily deleted script/*"
mv script2 script
svn add script
sudo chmod +x script/*
svn commit -m "restored script/* with +x"
svn export script script2
svn delete script
svn commit -m “deleted script/* so that i could chmod +x and check back in”
mv script2 script
svn add script
sudo chmod +x script/*
svn commit -m “deleted script/* so that i could chmod +x and check back in”

Leave a Reply