Commit a57b28ce authored by Nico Schottelius's avatar Nico Schottelius

Links hard, not symbolic

parent 2e9193b8
#!/bin/sh
#
# Nico Schottelius <nico-linux //@// schottelius.org>
# Date: 13-Mär-2007
# Last Modified: -
# Description: Links files from /usr/packages/$pkg/$dir/* to /usr/local/$dir
#
if [ "$#" -ne 2 ]; then
echo "$0: package (below /usr/packages/) subdir (like bin, lib or include)"
exit 1
fi
basedir="$1"
subdir="$2"
destination=/usr/local
ddir="${destination}/${subdir}"
# link!
for file in "${basedir}/${subdir}"/*; do
if [ -f "$file" ]; then
ln "$file" "$ddir"
else
# directory
ln -s "$file" "$ddir"
fi
done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment