mirror of
https://github.com/bigbluebutton/docker.git
synced 2025-08-10 21:23:37 +02:00
cache tags of submodules, load_env function
This commit is contained in:
28
scripts/functions.sh
Normal file
28
scripts/functions.sh
Normal file
@ -0,0 +1,28 @@
|
||||
function load_env {
|
||||
FILE=.env
|
||||
if [ "$BBB_DOCKER_DEV" = "1" ]; then
|
||||
FILE=dev.env
|
||||
else
|
||||
FILE=.env
|
||||
fi
|
||||
|
||||
if [ -f $FILE ]
|
||||
then
|
||||
export $(cat $FILE | sed 's/#.*//g' | grep -v "WELCOME_FOOTER" | grep -v "WELCOME_MESSAGE" | grep -v "CLIENT_TITLE" | xargs)
|
||||
fi
|
||||
}
|
||||
|
||||
function ensure_submodules {
|
||||
MISSING_SUBMODULES=$(git submodule status | grep -v ' (' | awk '{print $2}' || /bin/true)
|
||||
echo
|
||||
if [ ! -z "$MISSING_SUBMODULES" ]; then
|
||||
echo "ERROR: following submodules are not checked out. we can't continue here"
|
||||
git submodule status | grep -v ' (' | awk '{print " -", $2}'
|
||||
echo ""
|
||||
echo "if you really want to build images by yourself (not required for a normal production setup), use following command to check out all the submodules and try again"
|
||||
echo " git submodule update --init"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user