Skip to content

Commit 9c71ecd

Browse files
committed
Use prebuild-install
1 parent d362dfd commit 9c71ecd

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"main": "index.js",
77
"scripts": {
88
"BigRedButton": "scripts/BigRedButton",
9-
"install": "prebuild --download https://github.com/NodeOS/genfatfs/releases/download/v{version}/{platform}-{arch}.tar.gz",
9+
"build": "scripst/build",
10+
"install": "prebuild-install -d https://github.com/NodeOS/genfatfs/releases/download/v{version}/{platform}-{arch}.tar.gz || npm run build",
1011
"start": "./genfatfs"
1112
},
1213
"repository": {
@@ -29,6 +30,9 @@
2930
},
3031
"homepage": "https://github.com/NodeOS/genfatfs#readme",
3132
"dependencies": {
33+
"prebuild-install": "^1.0.1"
34+
},
35+
"devDpendencies": {
3236
"prebuild": "piranna/prebuild"
3337
}
3438
}

scripts/BigRedButton

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Build genfatfs
55
#
66

7-
make || exit 1
7+
scripts/build || exit 1
88

99
#
1010
# Pack genfatfs in a node-gyp compatible way
@@ -27,6 +27,8 @@ esac
2727

2828
MACHINE="`uname -m`"
2929
case $MACHINE in
30+
'i686') ARCH=ia32 ;;
31+
3032
'x86_64') ARCH=x64 ;;
3133

3234
*)

scripts/build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env sh
2+
3+
make || exit $?

0 commit comments

Comments
 (0)