chiark
/
gitweb
/
~mdw
/
runlisp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidy up the shell scripts somewhat.
[runlisp]
/
mklinks.in
diff --git
a/mklinks.in
b/mklinks.in
index fd126f201981f14208fd8f8733557fdecba634a3..863ead7cc04239d2e19ebd5c062a5c7c2a0daa50 100755
(executable)
--- a/
mklinks.in
+++ b/
mklinks.in
@@
-71,8
+71,8
@@
done
[ $# = 0 ] && set .links
cat "$@" | while read name; do
[ $# = 0 ] && set .links
cat "$@" | while read name; do
- base="$(echo $name | sed 's:^.*/::')"
- dir="$(echo $name | sed 's:^[^/]:./&:; s:/[^/]*$::')"
+ case "$name" in "" | "#"*) continue ;; esac
+ base=${name##*/} dir=${name%/*}
if [ -r "$pkgdatadir/$base" ]; then
mkdir -p "$dir"
rm -f "$name"
if [ -r "$pkgdatadir/$base" ]; then
mkdir -p "$dir"
rm -f "$name"