-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
prep-legacy.sh
executable file
·20 lines (15 loc) · 1.46 KB
/
prep-legacy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh -e
# clear old downloads
rm georaster-layer-for-leaflet.*
# download old versions from unpkg
wget https://unpkg.com/[email protected]/georaster-layer-for-leaflet.browserify.min.js
wget https://unpkg.com/[email protected]/georaster-layer-for-leaflet.bundle.js
wget https://unpkg.com/[email protected]/georaster-layer-for-leaflet.js
wget https://unpkg.com/[email protected]/georaster-layer-for-leaflet.min.js
wget https://unpkg.com/[email protected]/georaster-layer-for-leaflet.min.js.map
# inject warning / deprecation message
GEORASTER_LAYER_DEPRECATION_MESSAGE="\nconsole.warn('DEPRECATION WARNING: Hello. You are probably using an old link to an old version of georaster-layer-for-leaflet that will be removed at the end of 2021. You can probably remove this warning by upgrading to using https://unpkg.com/georaster-layer-for-leaflet/dist/georaster-layer-for-leaflet.min.js. If that does not work, please consult https://github.com/GeoTIFF/georaster-layer-for-leaflet for more instructions or email me directly at [email protected]. Happy to help! :-)');"
echo $GEORASTER_LAYER_DEPRECATION_MESSAGE >> georaster-layer-for-leaflet.browserify.min.js
echo $GEORASTER_LAYER_DEPRECATION_MESSAGE >> georaster-layer-for-leaflet.bundle.js
echo $GEORASTER_LAYER_DEPRECATION_MESSAGE >> georaster-layer-for-leaflet.js
echo $GEORASTER_LAYER_DEPRECATION_MESSAGE >> georaster-layer-for-leaflet.min.js