kiss-mfavila-large/NR_MAINT_TOOLS/depends-fix.sh

19 lines
612 B
Bash
Executable File

#!/bin/sh -e
enum_rolling()
{
MID_DIR=$(printf $KISS_PATH|sed -ne 's/.*:\(.*kiss-mfavila\):.*/\1/p')
ls "${MID_DIR}/community-mod/rolling/"
}
for file in enum_rolling #For every file under rolling...
do
cp "${MID_DIR}/${file}/depends" "${MID_DIR}/${file}/depends.new"
for file2 in enum_rolling #...do, using every file name under rolling...
do
sed -ne "s/${file2}/${file2}-git/p" "${MID_DIR}/${file2}/depends.new" > "${MID_DIR}/${file2}/depends.new} #...a replacement of the file name with an adjusted one.
done
mv "${MID_DIR}/${file}/depends.new" "${MID_DIR}/${file}/depends"
done