Created
March 11, 2019 10:32
-
-
Save fenrig/9095e2968ae45150fe3d8de2cf00fa82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
ROOTFS_DIR="rootfs" | |
ROOTFS_TAR="" | |
METADATA_YAML="metadata.yaml" | |
METADATA_TAR="" | |
if [ -z "$METADATA_TAR" ] | |
then | |
echo "Generate METADATA_TAR" | |
METADATA_TAR="metadata.tar.xz" | |
tar -cJf $METADATA_TAR $METADATA_YAML | |
else | |
echo "Pre generated METADATA_TAR" | |
fi | |
if [ -z "$ROOTFS_TAR" ] | |
then | |
echo "Generate ROOTFS_TAR" | |
ROOTFS_TAR="rootfs.tar.xz" | |
tar -cJf $ROOTFS_TAR -C $ROOTFS_DIR . | |
else | |
echo "Pre generated ROOTFS_TAR" | |
fi | |
#lxc image import $METADATA_TAR $ROOTFS_TAR --alias lxc_domoticz_buildroot | |
lxc-create lxc_domoticz_buildroot -t local -- --fstree $ROOTFS_TAR --metadata $METADATA_TAR | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
architecture: armv7 | |
creation_date: 1552061064 | |
properties: | |
description: buildroot domoticz | |
os: buildroot | |
release: domoticz | |
distribution: buildroot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment