Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Move scripts for non ec2 machines to dir.one
Browse files Browse the repository at this point in the history
generate.sh is also modified so it copies the files from these
directories by default or use dir.$ENVIRONMENT if specified. For
example, use ENVIRONMENT=ec2 to copy the directories that end in .ec2:

ENVIRONMENT=ec2 ./generate.sh

base
base.ec2
base_deb
base_deb.ec2
  • Loading branch information
jfontan committed Nov 25, 2015
1 parent ebc52b1 commit dff9317
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 14 additions & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #

ENVIRONMENT=${ENVIRONMENT:-one}

if [ $ENVIRONMENT != "one" ]; then
DEFAULT_NAME="one-context-$ENVIRONMENT"
else
DEFAULT_NAME="one-context"
fi

VERSION=${VERSION:-4.14.3}
MAINTAINER=${MAINTAINER:-OpenNebula Systems <support@opennebula.systems>}
LICENSE=${LICENSE:-Apache 2.0}
PACKAGE_NAME=${PACKAGE_NAME:-one-context}
PACKAGE_NAME=${PACKAGE_NAME:-$DEFAULT_NAME}
VENDOR=${VENDOR:-OpenNebula Systems}
DESC="
This package prepares a VM image for OpenNebula:
Expand Down Expand Up @@ -49,8 +57,13 @@ rm $NAME

rm -rf tmp
mkdir tmp

cp -r base/* tmp
test -d base.$ENVIRONMENT && cp -r base.$ENVIRONMENT/* tmp

cp -r base_$PACKAGE_TYPE/* tmp
test -d base_$PACKAGE_TYPE.$ENVIRONMENT && \
cp -r base_$PACKAGE_TYPE.$ENVIRONMENT/* tmp

for i in $*; do
cp -r "$i" tmp
Expand Down

0 comments on commit dff9317

Please sign in to comment.