Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

executable file 63 lines (48 sloc) 1.309 kb
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
#!/bin/bash

PYTHON_EXE="/usr/bin/env python"

NIMBUS_SRC_REL="`dirname $0`/.."
NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`

if [ "X$1" = "X" ]; then
    echo ""
    echo "Usage: $0 destination_dir"
    echo " You must specify the destination directory."
    echo ""
    exit 1
fi

NIMBUS_HOME=$1

chmod 755 $NIMBUS_HOME/libexec/*sh
if [ $? -ne 0 ]; then
    echo "Could not chmod $NIMBUS_HOME/libexec files"
    exit 1
fi

CONFIG_SCRIPT="$NIMBUS_HOME/bin/nimbus-configure"


CUMULUS_REPO_BUCKET=`$CONFIG_SCRIPT --print-repobucket`
if [ $? -ne 0 ]; then
    echo "Could not determine Cumulus repository bucket."
    exit 1
fi

CUMULUS_HOST=`$CONFIG_SCRIPT --print-hostname`
if [ $? -ne 0 ]; then
    echo "Could not determine chosen hostname."
    exit 1
fi

echo ""
echo "Creating Cumulus repository with the following commands:"
echo ""

export CUMULUS_SETTINGS_FILE=$NIMBUS_HOME/cumulus/etc/cumulus.ini
CUMULUS_ENV="$NIMBUS_HOME/cumulus/env.sh"
if [ ! -f $CUMULUS_ENV ]; then
    echo "Expected file to be created: $CUMULUS_ENV"
    exit 1
fi

source $CUMULUS_ENV
REPOCMD="$NIMBUS_HOME/ve/bin/cumulus-create-repo-admin $CUMULUS_REPO_BUCKET"

echo " $REPOCMD"
echo ""

$REPOCMD >/dev/null
if [ $? -ne 0 ]; then
    echo "Could not create Cumulus repository."
    exit 1
fi
echo "Created repo admin."

exit 0
Something went wrong with that request. Please try again.