repo.or.cz
/
rbx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Change soft-fail to use the config, rather than env
[rbx.git]
/
tools
/
rubuildius
/
bin
/
cleanup.zsh
blob
0e99b141547aa25a47959147a09a9030f11f7def
1
#!/bin/zsh
2
3
setopt extendedglob
4
5
cd
$1
6
7
integer ndirs
8
dirs
=(*
~HEAD
(/
N
))
9
((
ndirs
=
${#dirs}
))
10
11
# if there are more than 20 dirs, delete the last 10 of them.
12
# be sure to never delete HEAD accidently.
13
[[
$ndirs
-gt
20
]] &&
rm
-rf
*
~HEAD
(
D
/
om
[
-11
,
-1
])
14
15
exit
0