Commit 6a179539 authored by Manuel Moos's avatar Manuel Moos Committed by Manuel Moos
Browse files

Remove fixlinks

Its job was to turn absolute into relative links. All our
links now already are relative, so it is no longer needed.
parent 8663ad40
Pipeline #234245891 passed with stages
in 40 minutes and 24 seconds
......@@ -23,9 +23,6 @@ for f in $(find ${APPDIR} -type d -name "desktop"); do
cp $f/icons/48x48/*.png ${APPDIR}/${ICON_NAME}.png
done
# correct absolute symlinks
APPDIR=${APPDIR} $(dirname $0)/fixlinks
lastpath=/usr/lib/*linux-gnu
otherpath=${lastpath}
......
#!/bin/bash
# fixes absolute symbolic links
set -x
# correct absolute symlinks
pushd ${APPDIR}
function processlinks()
{
while read SOURCE; do
TARGET=$(ls -l "${SOURCE}" | sed -e "s,.*-> *,,")
RELATIVEUP=$(dirname ${SOURCE} | sed -e 's,^./,,' -e 's,[^/]*,..,g')
if echo ${TARGET} | grep '^/' > /dev/null; then
NEWTARGET=${RELATIVEUP}${TARGET}
ln -sf ${NEWTARGET} ${SOURCE}
fi
done
}
find . -type l | processlinks
popd
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