YetAnotherCallBlocker_data/prepare_sia

49 lines
827 B
Plaintext
Raw Normal View History

2019-03-22 18:53:36 +01:00
#!/bin/bash
shopt -s extglob
cd assets/sia
if grep -q -E 'MTZ[^FDXE]' * ; then
echo 'Unknown MTZ sequence found!'
fi
echo 'Processing *_slice_info.dat files'
for f in *_slice_info.dat; do
echo " * processing" $f
sed -i -e 's/MDI/YACBSIAI/' "$f"
done
echo 'Processing *_slice_list.dat files'
for f in *_slice_list.dat; do
echo " * processing" $f
sed -i -e 's/+/*/g' "$f"
done
echo 'Processing data_slice_*.dat files'
for f in data_slice_+([0-9]).dat; do
#echo " * processing" $f
sed -i -e '
s/MTZF/YABF/
s/MTZD/YABF/
s/MTZEND/YABEND/' "$f"
done
echo 'Processing featured_slice_*.dat files'
for f in featured_slice_+([0-9]).dat; do
#echo " * processing" $f
sed -i -e '
s/MTZX/YABX/
s/MTZEND/YABEND/' "$f"
done
if grep -q -e 'MTZ' * ; then
echo 'MTZ is still present!'
else
echo 'Seems clean'
fi