1- set -a
2-
3- WORKSPACE_DIR=` realpath $( dirname $0 ) /..`
4-
5- NOTION_VERSION=" ${NOTION_VERSION:- 2.0.16} "
6- NOTION_DOWNLOAD_HASH=" ${NOTION_DOWNLOAD_HASH:- 9f72284086cda3977f7f569dff3974d5} "
7- NOTION_DOWNLOAD_URL=" https://desktop-release.notion-static.com/Notion%20Setup%20${NOTION_VERSION} .exe"
8- NOTION_DOWNLOADED_NAME=" Notion-${NOTION_VERSION} .exe"
9-
10- NOTION_ENHANCER_COMMIT=" ${NOTION_ENHANCER_COMMIT:- b248ffa3bac393f267a4600d4e951aba8565f31e} "
11- NOTION_ENHANCER_REPO_URL=" https://github.com/notion-enhancer/notion-enhancer"
12-
13- NOTION_EXTRACTED_EXE_NAME=" extracted-exe"
14- NOTION_EXTRACTED_APP_NAME=" extracted-app"
15- NOTION_VANILLA_SRC_NAME=" vanilla-src"
16- NOTION_ENHANCED_SRC_NAME=" enhanced-src"
17- NOTION_EMBEDDED_NAME=" embedded_enhancer"
18-
19- NOTION_REPACKAGED_REVISION=" ${NOTION_REPACKAGED_REVISION:- 1} "
20- NOTION_REPACKAGED_VERSION_REV=" ${NOTION_VERSION} -${NOTION_REPACKAGED_REVISION} "
21- NOTION_REPACKAGED_HOMEPAGE=" https://github.com/jamezrin/notion-repackaged"
22- NOTION_REPACKAGED_REPO=${NOTION_REPACKAGED_REPO:- ${NOTION_REPACKAGED_HOMEPAGE} }
23- NOTION_REPACKAGED_AUTHOR=" Notion Repackaged"
24-
25- set +a
1+ export WORKSPACE_DIR=` realpath $( dirname $0 ) /..`
262
273function log() {
284 caller=` basename " $0 " `
@@ -36,6 +12,15 @@ function check-cmd() {
3612 fi
3713}
3814
15+ function check-env() {
16+ for var_name in " $@ " ; do
17+ if [ -z " ${! var_name} " ]; then
18+ log " Required environment variable $var_name is not set"
19+ exit -1
20+ fi
21+ done
22+ }
23+
3924function workspace-dir-pushd() {
4025 mkdir -p " ${WORKSPACE_DIR} /build"
4126 pushd " ${WORKSPACE_DIR} /build" > /dev/null
@@ -46,3 +31,21 @@ function check-debug-expands() {
4631 set -x
4732 fi
4833}
34+
35+ check-env NOTION_VERSION NOTION_REPACKAGED_REVISION NOTION_DOWNLOAD_HASH NOTION_ENHANCER_COMMIT
36+
37+ export NOTION_DOWNLOAD_URL=" https://desktop-release.notion-static.com/Notion%20Setup%20${NOTION_VERSION} .exe"
38+ export NOTION_DOWNLOADED_NAME=" Notion-${NOTION_VERSION} .exe"
39+
40+
41+ export NOTION_ENHANCER_REPO_URL=" https://github.com/notion-enhancer/notion-enhancer"
42+ export NOTION_EXTRACTED_EXE_NAME=" extracted-exe"
43+ export NOTION_EXTRACTED_APP_NAME=" extracted-app"
44+ export NOTION_VANILLA_SRC_NAME=" vanilla-src"
45+ export NOTION_ENHANCED_SRC_NAME=" enhanced-src"
46+ export NOTION_EMBEDDED_NAME=" embedded_enhancer"
47+
48+ export NOTION_REPACKAGED_VERSION_REV=" ${NOTION_VERSION} -${NOTION_REPACKAGED_REVISION} "
49+ export NOTION_REPACKAGED_HOMEPAGE=" https://github.com/jamezrin/notion-repackaged"
50+ export NOTION_REPACKAGED_REPO=${NOTION_REPACKAGED_REPO:- ${NOTION_REPACKAGED_HOMEPAGE} }
51+ export NOTION_REPACKAGED_AUTHOR=" Notion Repackaged"
0 commit comments