-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·24 lines (18 loc) · 946 Bytes
/
install.sh
File metadata and controls
executable file
·24 lines (18 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
WGET_DOWNLOAD_DIRECTORY=/tmp/raylib
VERSION=5.5
PLATFORM=linux_amd64
RELEASE=raylib-$VERSION\_$PLATFORM
## check for directory being created and remove if so
[ -d $WGET_DOWNLOAD_DIRECTORY ] && rm -rf $WGET_DOWNLOAD_DIRECTORY
## downloading the raylib release according to $VERSION and $PLATFORM
wget https://github.com/raysan5/raylib/releases/download/$VERSION/$RELEASE.tar.gz \
--directory-prefix=$WGET_DOWNLOAD_DIRECTORY
## unarchiving
tar -xvzf $WGET_DOWNLOAD_DIRECTORY/$RELEASE.tar.gz --directory=$WGET_DOWNLOAD_DIRECTORY/
## copying the lib/ and include/ directories from the archive to this project
[ ! -d ./lib/raylib/ ] && mkdir -p ./lib/raylib
cp -r $WGET_DOWNLOAD_DIRECTORY/$RELEASE/lib/ ./lib/raylib
cp -r $WGET_DOWNLOAD_DIRECTORY/$RELEASE/include/ ./lib/raylib
## removing the rest, the .gz archive is stil available just in case.
rm -r $WGET_DOWNLOAD_DIRECTORY/$RELEASE/