nsbin/remove-links
Nico Schottelius df2daf524d init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
2017-07-19 17:15:41 +02:00

18 lines
397 B
Text

if [ -z "$1" ]; then
echo noe
exit 1
fi
for dirs in bin sbin lib include share; do
cd "$1/$dirs"
for file in *; do
if [ -L /usr/$dirs/"$file" ]; then
echo removing link $file
rm /usr/$dirs/"$file"
elif [ -d /usr/$dirs/"$file" ]; then
rmdir /usr/$dirs/"$file"
else
echo /usr/$dirs/"$file" is not a link...
fi
done
done