mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
Windows build: Use Git to get Etherpad root dir
This commit is contained in:
parent
54019a24c3
commit
5788c1958d
1 changed files with 6 additions and 5 deletions
|
@ -9,15 +9,16 @@ fatal() { error "$@"; exit 1; }
|
||||||
try() { "$@" || fatal "'$@' failed"; }
|
try() { "$@" || fatal "'$@' failed"; }
|
||||||
is_cmd() { command -v "$@" >/dev/null 2>&1; }
|
is_cmd() { command -v "$@" >/dev/null 2>&1; }
|
||||||
|
|
||||||
for x in unzip wget zip; do
|
for x in git unzip wget zip; do
|
||||||
is_cmd "${x}" || fatal "Please install ${x}"
|
is_cmd "${x}" || fatal "Please install ${x}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Move to the folder where ep-lite is installed
|
# Move to the folder where Etherpad is checked out
|
||||||
mydir=$(try cd "${0%/*}" && try pwd -P) || exit 1
|
try cd "${0%/*}"
|
||||||
try cd "${mydir}/../.."
|
START_FOLDER=$(try git rev-parse --show-toplevel) || exit 1
|
||||||
|
try cd "${START_FOLDER}"
|
||||||
|
[ -f src/package.json ] || fatal "failed to cd to etherpad root directory"
|
||||||
|
|
||||||
START_FOLDER=$(try pwd) || exit 1
|
|
||||||
TMP_FOLDER=$(try mktemp -d) || exit 1
|
TMP_FOLDER=$(try mktemp -d) || exit 1
|
||||||
|
|
||||||
log "create a clean environment in $TMP_FOLDER..."
|
log "create a clean environment in $TMP_FOLDER..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue