-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_iojs.sh
executable file
·32 lines (29 loc) · 1.52 KB
/
get_iojs.sh
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
#!/usr/bin/env bash
VER=$1
if [[ -z ${VER} ]]; then
echo "Usage: \"$0 1.6.10\""
exit 1
fi
DIST_DIR=vendors
IOJS_DIR=iojs
if [ ! -d ${IOJS_DIR} ]; then
mkdir -p ${IOJS_DIR}/x64
mkdir -p ${IOJS_DIR}/win-x64
mkdir -p ${IOJS_DIR}/win-x86
wget https://atom.io/download/electron/v${VER}/SHASUMS256.txt -O ${IOJS_DIR}/SHASUMS256.txt
wget https://atom.io/download/electron/v${VER}/iojs-v${VER}.tar.gz -O ${IOJS_DIR}/iojs-v${VER}.tar.gz
wget https://atom.io/download/electron/v${VER}/iojs-v${VER}-headers.tar.gz -O ${IOJS_DIR}/iojs-v${VER}-headers.tar.gz
wget https://atom.io/download/electron/v${VER}/node-v${VER}.tar.gz -O ${IOJS_DIR}/node-v${VER}.tar.gz
wget https://atom.io/download/electron/v${VER}/node-v${VER}-headers.tar.gz -O ${IOJS_DIR}/node-v${VER}-headers.tar.gz
wget https://atom.io/download/electron/v${VER}/node.lib -O ${IOJS_DIR}/node.lib
wget https://atom.io/download/electron/v${VER}/x64/node.lib -O ${IOJS_DIR}/x64/node.lib
wget https://atom.io/download/electron/v${VER}/win-x64/iojs.lib -O ${IOJS_DIR}/win-x64/iojs.lib
wget https://atom.io/download/electron/v${VER}/win-x64/node.lib -O ${IOJS_DIR}/win-x64/node.lib
wget https://atom.io/download/electron/v${VER}/win-x86/iojs.lib -O ${IOJS_DIR}/win-x86/iojs.lib
wget https://atom.io/download/electron/v${VER}/win-x86/node.lib -O ${IOJS_DIR}/win-x86/node.lib
ZIP_FILE=${DIST_DIR}/iojs.zip
\rm -f ${ZIP_FILE} && zip -r ${ZIP_FILE} ${IOJS_DIR}
echo "iojs (${VER}) header files have been saved as ${ZIP_FILE}"
\rm -rf ${IOJS_DIR}
fi
#echo ${VER} > version