replace lsx with stest

This commit is contained in:
Connor Lane Smith 2011-11-19 19:54:55 +01:00
parent 8ac44eb75a
commit bb4424df07
7 changed files with 189 additions and 69 deletions

View file

@ -5,8 +5,10 @@ if [ ! -d "`dirname "$CACHE"`" ]; then
fi
(
IFS=:
if [ "`ls -dt $PATH "$CACHE" | head -n 1`" != "$CACHE" ]; then
lsx $PATH | sort -u > "$CACHE"
if ls -d $PATH | stest -q -n "$CACHE"; then
for dir in $PATH; do
ls $dir | stest -C $dir -fx
done | sort -u > "$CACHE"
fi
)
cmd=`dmenu "$@" < "$CACHE"` && exec sh -c "$cmd"