omnibus-gitlab/package-scripts/gitlab/makeselfinst

28 lines
655 B
Bash
Executable File

#!/bin/bash
#
# Install a full gitlab
#
PROGNAME=`basename $0`
INSTALLER_DIR=`dirname $0`
DEST_DIR=/opt/gitlab
CONFIG_DIR=/etc/gitlab
USAGE="usage: $0"
error_exit()
{
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
exit 1
}
# move the actual files into place
rm -rf $DEST_DIR/* || error_exit "Cannot remove contents of $DEST_DIR"
mkdir -p $DEST_DIR || error_exit "Cannot create $DEST_DIR"
cp -R $INSTALLER_DIR $DEST_DIR || error_exit "Cannot install to $DEST_DIR"
rm -f $DEST_DIR/$PROGNAME
# You may want to symlink your packages bin files into /usr/bin
# ln -sf $DEST_DIR/bin/gitlab /usr/bin || error_exit "Cannot link gitlab to /usr/bin"
exit 0