-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconst.sh
executable file
·28 lines (24 loc) · 951 Bytes
/
const.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
#!/bin/bash
#Set the global ENV variables
#cd to current script folder
if [[ ! -f "const.sh" ]] ; then
echo "[const] : The parent script is not running inside the directory that contains const.sh"
echo -e "\e[31mFATAL ERROR \e[0m"
exit 1
fi
#define environment variables
export WTL_DIR=$(pwd)
export WTL_REPO_DIR=$WTL_DIR"/WikiToLearn"
export WTL_CONFIGS_DIR=$WTL_DIR'/configs/'
export WTL_RUNNING=$WTL_DIR"/running/"
export WTL_CERTS=$WTL_DIR"/certs/"
export WTL_CACHE=$WTL_DIR"/cache/"
export WTL_LOCK_FILE=$WTL_CACHE"/wtlhome-lock"
export WTL_BACKUPS=$WTL_DIR"/backups/"
export WTL_MW_DUMPS=$WTL_DIR"/mw-dumps/"
export WTL_MW_DUMPS_DOWNLOAD=$WTL_DIR"/mw-dumps-download/"
export WTL_SCRIPTS=$WTL_DIR"/scripts/"
export WTL_TRUSTED_KEYS_REPO=$WTL_CONFIGS_DIR"/gpg-trusted-keys/"
export WTL_TRUSTED_KEYS_INDEX=$WTL_CONFIGS_DIR"gpg-trusted-keys-index"
export WTL_HOOKS=$WTL_DIR"/hooks/"
export WTL_CONFIG_FILE=$WTL_CONFIGS_DIR"wtl.conf"