49 lines
1.0 KiB
Bash
Executable File
49 lines
1.0 KiB
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
TARGET=`basename $(pwd)`
|
|
BUILD=$1
|
|
|
|
PACKAGE=$(echo $TARGET | cut -d'_' -f1)
|
|
VERSION=$(echo $TARGET | cut -d'_' -f2)
|
|
DISTRO=$(echo $TARGET | cut -d'_' -f3)
|
|
|
|
#
|
|
# Clean up directories
|
|
rm -rf staging
|
|
|
|
#
|
|
# Create directory for fpm to process
|
|
DIRS=""
|
|
for dir in $DIRS; do
|
|
mkdir -p staging$dir
|
|
DIRECTORIES="$DIRECTORIES --directories $dir"
|
|
done
|
|
|
|
##
|
|
|
|
mkdir -p staging/var/bigbluebutton/learning-dashboard
|
|
|
|
mkdir -p staging/etc/bigbluebutton/nginx
|
|
cp learning-dashboard.nginx staging/etc/bigbluebutton/nginx
|
|
|
|
|
|
# install dependencies, create build, copy build over to destination
|
|
npm ci
|
|
npm run build
|
|
cp -r build/* staging/var/bigbluebutton/learning-dashboard
|
|
|
|
##
|
|
|
|
. ./opts-$DISTRO.sh
|
|
|
|
fpm -s dir -C ./staging -n $PACKAGE \
|
|
--version $VERSION --epoch $EPOCH \
|
|
--before-install before-install.sh \
|
|
--after-install after-install.sh \
|
|
--after-remove after-remove.sh \
|
|
--depends unzip \
|
|
--description "BigBlueButton bbb-learning-dashboard" \
|
|
$DIRECTORIES \
|
|
$OPTS
|
|
|