forked from florindumitru/react-native-sip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibs.sh
More file actions
executable file
·37 lines (29 loc) · 694 Bytes
/
libs.sh
File metadata and controls
executable file
·37 lines (29 loc) · 694 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
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
echo SKIP
exit 0
set -e
VERSION="v3.0.0"
URL="https://github.com/telefon-one/react-native-sip2-builder/releases/download/${VERSION}/release.tar.gz"
LOCK=".libs.lock"
DEST=".libs.tar.gz"
DOWNLOAD=true
if ! type "curl" > /dev/null; then
echo "Missed curl dependency" >&2;
exit 1;
fi
if ! type "tar" > /dev/null; then
echo "Missed tar dependency" >&2;
exit 1;
fi
if [ -f ${LOCK} ]; then
CURRENT_VERSION=$(cat ${LOCK})
if [ "${CURRENT_VERSION}" == "${VERSION}" ];then
DOWNLOAD=false
fi
fi
if [ "$DOWNLOAD" = true ]; then
curl -L --silent "${URL}" -o "${DEST}"
tar -xvf "${DEST}"
rm -f "${DEST}"
echo "${VERSION}" > ${LOCK}
fi