mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
915d2e42b7
This will make rake cleaning go faster
44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
. $(dirname $0)/lib/polite-curl
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}" )/.."
|
|
|
|
if [[ $1 == '-s' ]]; then
|
|
SYMBOLS="true"
|
|
shift
|
|
fi
|
|
|
|
TARGET=${1:-cef}
|
|
DISTURL="https://gh-contractor-zcbenz.s3.amazonaws.com/cefode3/prebuilt-cef"
|
|
CURRENT_VERSION=$(cat cef/version 2>&1)
|
|
LATEST_VERSION=$(curl -fsSkL $DISTURL/version)
|
|
|
|
if [ -z "$LATEST_VERSION" ] ; then
|
|
echo "Could determine lastest version of cefode" >&2
|
|
exit 1
|
|
fi
|
|
|
|
TEMP_DIR=/tmp/atom-cached-cefodes/$LATEST_VERSION
|
|
|
|
if [[ $LATEST_VERSION != $CURRENT_VERSION ]]; then
|
|
if [ -d $TEMP_DIR ]; then
|
|
echo "Using cached version of cefode3 v${LATEST_VERSION} from ${TEMP_DIR}"
|
|
else
|
|
echo "Downloading/extracting cefode3 v${LATEST_VERSION}..."
|
|
mkdir -p $TEMP_DIR
|
|
polite_curl "${DISTURL}/cef_binary_latest.zip" > "${TEMP_DIR}/cef.zip"
|
|
unzip -q "${TEMP_DIR}/cef.zip" -d "${TEMP_DIR}"
|
|
fi
|
|
[ -e "${TARGET}" ] && rm -rf "${TARGET}"
|
|
cp -r "${TEMP_DIR}"/*_macosx "${TARGET}"
|
|
echo ${LATEST_VERSION} > 'cef/version'
|
|
fi
|
|
|
|
if [ -n "$SYMBOLS" ]; then
|
|
echo "Downloading/extracting symbols for cefode3 u${LATEST_VERSION}..."
|
|
polite_curl "${DISTURL}/cef_binary_latest_symbols.zip" > "${TEMP_DIR}/symbols.zip"
|
|
unzip -q "${TEMP_DIR}/symbols.zip" -d "${TEMP_DIR}"
|
|
mv "${TEMP_DIR}"/*_macosx_symbols/* "${TARGET}/Release"
|
|
fi
|