script to download SDL2.Framework

This commit is contained in:
Kelvin Sherlock 2021-05-29 23:33:31 -04:00
parent 9f38f2972a
commit e7a670efd3
1 changed files with 16 additions and 0 deletions

16
embedded/download-sdl.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/sh
DMG=SDL2-2.0.14.dmg
URL=https://www.libsdl.org/release/SDL2-2.0.14.dmg
FRAMEWORK=SDL2.framework
if [ -e $FRAMEWORK ] ; then exit 0 ; fi
if [ ! -e $DMG ] ; then curl -OL $URL ; fi
hdiutil attach $DMG -noverify -nobrowse -mountpoint /Volumes/sdl_disk_image
# cp -r /sdl_disk_image/$FRAMEWORK ./
ditto /Volumes/sdl_disk_image/$FRAMEWORK $FRAMEWORK
hdiutil detach /Volumes/sdl_disk_image