El código extraido de learngerman.dw.com. https://nulo.in/Arreglando%20bugs%20ajenos.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 lines
832 B

#!/bin/sh
big () {
echo '==================================='
echo "$1"
echo '==================================='
}
rm -rf orig
mkdir -p orig
cd orig || exit
big 'Extrayendo código de los source maps'
for f in ../maps/*.map; do
node ../source-from-sourcemaps.js "$f"
done
mv sources-gen/* .
rm -r sources-gen
# Por alguna razón un CSS se extrae ahí
cp -r src/components/* ./components/
big '.js -> .jsx'
find . -iname '*.js' -exec mv {} {}x \;
big 'Parcheando .svg'
find . -iname '*.svg' -exec sh -c '
echo "const __webpack_public_path__ = \"https://learngerman.dw.com/\";" > "${1}.js"
cat "$1" >> "${1}.js"
rm "$1"
' sh {} \;
big 'Copiando archivos de static/'
cp -r ../static/* ./
big 'Parcheando...'
for f in ../patches/*; do
echo "--> Parche $f"
patch -p1 < "$f"
done
big 'DONE. Código extraido en "orig".'