Skip to content

Commit

Permalink
cache downloaded electron files
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Nov 20, 2016
1 parent a472da6 commit f5f5df9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bin/build
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/bash

echo "Download Electron OSX version..."
url="https://github.com/atom/electron/releases/download/v0.35.4/electron-v0.35.4-mas-x64.zip"
TARGET_FILE="electron.zip"
curl -L -o $TARGET_FILE $url
VERSION="0.37.8"
# China Mirror
URL="https://npm.taobao.org/mirrors/electron/$VERSION/electron-v$VERSION-mas-x64.zip"
# URL="https://github.com/atom/electron/releases/download/v$VERSION/electron-v$VERSION-mas-x64.zip"
TARGET_FILE="electron_$VERSION.zip"

[ -f $TARGET_FILE ] && echo "Found cache" || curl -L -o $TARGET_FILE $URL
unzip $TARGET_FILE -d electron > /dev/null
rm $TARGET_FILE

APP_PATH="Medis.app"
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
Expand Down

0 comments on commit f5f5df9

Please sign in to comment.