-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·31 lines (25 loc) · 814 Bytes
/
install
File metadata and controls
executable file
·31 lines (25 loc) · 814 Bytes
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
29
30
31
#!/bin/bash
[[ -z "$INFO_LEVEL" ]] && source ./bits/bootstrap/logging
#-----------
# Configurations
#-----------
TARBALL_BASE_DIR=${TARBALL_BASE_DIR-/var/local/apps}
TARBALL_NAME=${TARBALL_NAME}
TARBALL_EXTRACT_NAME=${TARBALL_EXTRACT_NAME-$TARBALL_NAME}
TARBALL_FILENAME=${TARBALL_FILENAME}
TARBALL_APP_DIR=${TARBALL_BASE_DIR}/${TARBALL_NAME}
TARBALL_FULL_FILENAME=$(pwd)/$TARBALL_FILENAME
#-----------
# Install Script
#-----------
if [[ "`which unzip`" == "" ]]; then
apt-get install -y unzip
fi
if [[ -e $TARBALL_APP_DIR ]]; then
debug "$TARBALL_NAME already deployed to $TARBALL_APP_DIR."
else
notify "Creating $TARBALL_NAME ($TARBALL_BASE_DIR)..."
mkdir -p $TARBALL_BASE_DIR
(cd $TARBALL_BASE_DIR && tar zxf $TARBALL_FULL_FILENAME)
debug "DONE Creating $TARBALL_NAME ($TARBALL_BASE_DIR)"
fi