commit
22863ca3f0
@ -125,6 +125,7 @@ OVERLAY_TYPE=folder
|
||||
#
|
||||
# glibc_full - all core GNU C libraries.
|
||||
# bosh_cli - BOSH CLI (command line interface).
|
||||
# c2048 - console version of the game 2048
|
||||
# cf_cli - Cloud Foundry CLI (command line interface).
|
||||
# cf_tools - all BOSH and Cloud Foundry tools.
|
||||
# coreutils - set of commonly used GNU executable utilities.
|
||||
|
@ -29,6 +29,8 @@ Currently available overlay bundles:
|
||||
case for this tool is to create and manage Cloud Foundry
|
||||
infrastructures.
|
||||
|
||||
c2048 - console version of the game 2048
|
||||
|
||||
cf_cli - Cloud Foundry command line tool. It can be used to manage all
|
||||
aspects of already existing Cloud Foundry installation,
|
||||
including the full software development lifecycle in cloud
|
||||
|
5
src/minimal_overlay/bundles/c2048/.config
Normal file
5
src/minimal_overlay/bundles/c2048/.config
Normal file
@ -0,0 +1,5 @@
|
||||
# You can find the latest c2048 source bundles here:
|
||||
#
|
||||
# https://github.com/mevdschee/2048.c
|
||||
#
|
||||
C2048_SOURCE_URL=https://raw.githubusercontent.com/mevdschee/2048.c/master/2048.c
|
36
src/minimal_overlay/bundles/c2048/01_get.sh
Executable file
36
src/minimal_overlay/bundles/c2048/01_get.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. ../../common.sh
|
||||
|
||||
# Read the common configuration properties.
|
||||
DOWNLOAD_URL=`read_property C2048_SOURCE_URL`
|
||||
USE_LOCAL_SOURCE=`read_property USE_LOCAL_SOURCE`
|
||||
|
||||
# Grab everything after the last '/' character.
|
||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||
|
||||
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
|
||||
echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
|
||||
USE_LOCAL_SOURCE="false"
|
||||
fi
|
||||
|
||||
cd $MAIN_SRC_DIR/source/overlay
|
||||
|
||||
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||
# Downloading c2048 source bundle file. The '-c' option allows the download to resume.
|
||||
echo "Downloading c2048 source bundle from $DOWNLOAD_URL"
|
||||
wget -c $DOWNLOAD_URL
|
||||
else
|
||||
echo "Using local c2048 source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
|
||||
fi
|
||||
|
||||
# Delete folder with previously extracted 2048.
|
||||
echo "Removing c2048 work area. This may take a while."
|
||||
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
|
||||
mkdir $WORK_DIR/overlay/$BUNDLE_NAME
|
||||
|
||||
cp $ARCHIVE_FILE $WORK_DIR/overlay/$BUNDLE_NAME
|
||||
|
||||
cd $SRC_DIR
|
20
src/minimal_overlay/bundles/c2048/02_build.sh
Executable file
20
src/minimal_overlay/bundles/c2048/02_build.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. ../../common.sh
|
||||
|
||||
cd $WORK_DIR/overlay/$BUNDLE_NAME
|
||||
|
||||
rm -f 2048
|
||||
|
||||
gcc $CFLAGS -Os -o 2048 2048.c
|
||||
strip -g 2048
|
||||
|
||||
mkdir -p $OVERLAY_ROOTFS/usr/bin
|
||||
cp --remove-destination $PWD/2048 $OVERLAY_ROOTFS/usr/bin/
|
||||
|
||||
echo "Bundle 'c2048' has been installed."
|
||||
|
||||
cd $SRC_DIR
|
||||
|
8
src/minimal_overlay/bundles/c2048/bundle.sh
Executable file
8
src/minimal_overlay/bundles/c2048/bundle.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
./01_get.sh
|
||||
./02_build.sh
|
||||
|
||||
cd $SRC_DIR
|
1
src/minimal_overlay/bundles/c2048/bundle_deps
Normal file
1
src/minimal_overlay/bundles/c2048/bundle_deps
Normal file
@ -0,0 +1 @@
|
||||
glibc_libc
|
Loading…
x
Reference in New Issue
Block a user