This website requires JavaScript.
CODE
0x495fab29
Explore
Sign in
forks
/
apenwarr-redo
Watch
1
Star
0
Fork
You've already forked apenwarr-redo
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
d7a057ed29
apenwarr-redo
/
t
/
250-makedir
/
makedir.do
3 lines
43 B
Text
Raw
Normal View
History
Unescape
Escape
Remove special case for "dirname" -> "dirname/all" It actually decreases readability of the .do files - by not making it explicit when you're going into a subdir. Plus it adds ambiguity: what if there's a dirname.do *and* a dirname/all? We could resolve the ambiguity if we wanted, but that adds more code, while taking out this special case makes *less* code and improves readability. I think it's the right way to go.
2010-11-24 02:48:27 -08:00
rm -rf "$1"
If the created target is a directory, it's okay for the .do to create it. Normally, creating the target $1 yourself is bad; create $3 instead. But if $1 is a directory, we'll allow it. That way 'redo subdir' can call subdir.do, and subdir.do can both create the directory *and* run a bunch of sub-.do files on it.
2010-11-24 02:30:54 -08:00
mkdir $1
Remove special case for "dirname" -> "dirname/all" It actually decreases readability of the .do files - by not making it explicit when you're going into a subdir. Plus it adds ambiguity: what if there's a dirname.do *and* a dirname/all? We could resolve the ambiguity if we wanted, but that adds more code, while taking out this special case makes *less* code and improves readability. I think it's the right way to go.
2010-11-24 02:48:27 -08:00
echo $$ >>makedir.log
Reference in a new issue
Copy permalink