Upgrade from 3.4.1 to 4.0.0, steps are not correct if link_name_length is not 8 chars long
Hello,
I tried to upgrade my Jirafeau installation , i followed the steps from here : https://gitlab.com/mojo42/Jirafeau/-/blob/master/CHANGELOG.md#upgrade-from-341-to-400
But i was unable to see my files after the migration.
In my configuration, i have : $cfg['link_name_length'] = 12;
The problem was is the links. This is what i done to migrate my links :
regexp="^([[:alnum:]_-]{8})([[:alnum:]_-]{4})$"
find links -type f | \
while read link; do
bn="$(basename "$link")";
if [[ $bn =~ $regexp ]];
then
mkdir -p "links/${BASH_REMATCH[1]}/${BASH_REMATCH[2]}"
mv "$link" "links/${BASH_REMATCH[1]}/${BASH_REMATCH[2]}/"
else
echo "[ERR] No match for : $ligne";
fi
done
find links -maxdepth 1 -type d -iname "?" -exec rm -rf {} \;
Have a nice day and thank you for Jirafeau !
Regards.