memories/patches/filerobot-patch.sh

17 lines
475 B
Bash

#!/bin/bash
target="node_modules/react-filerobot-image-editor/lib/utils"
if [ -f $target/loadImageOriginal.js ]; then
echo "Filerobot is already patched, copying patch again ..."
else
if [ ! -f $target/loadImage.js ]; then
echo "Filerobot not installed or patch outdated"
exit 1
fi
echo "Patching filerobot-image-editor ..."
cp $target/loadImage.js $target/loadImageOriginal.js
fi
cp patches/filerobot-loadImage.js $target/loadImage.js