mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
2cbbd42d56
The dmenu_path in dmenu 4.3.1 seems to be picking up non-executables on my system. I was thinking of waiting until upstream fixes this, but there is still some churn going on regarding the dmenu_run/path scripts. I figured it would be better to get this small fix out there in the mean time. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
26 lines
344 B
Bash
26 lines
344 B
Bash
#!/bin/sh
|
|
CACHE=$HOME/.dmenu_cache
|
|
IFS=:
|
|
|
|
uptodate() {
|
|
test -f "$CACHE" &&
|
|
for dir in $PATH
|
|
do
|
|
test ! $dir -nt "$CACHE" || return 1
|
|
done
|
|
}
|
|
|
|
if ! uptodate
|
|
then
|
|
for dir in $PATH
|
|
do
|
|
cd "$dir" &&
|
|
for file in *
|
|
do
|
|
test -x "$file" && echo "$file"
|
|
done
|
|
done | sort | uniq > "$CACHE".$$ &&
|
|
mv "$CACHE".$$ "$CACHE"
|
|
fi
|
|
|
|
cat "$CACHE"
|