Support having version-specific lxc-config as conf/${DISTRIBUTION}-${RELEASE}
authorMichael Adam <obnox@samba.org>
Wed, 7 Jan 2015 09:52:08 +0000 (10:52 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 7 Dec 2015 09:44:06 +0000 (10:44 +0100)
if present, this is used, otherwise conf/${DISTRIBUTION} as before.

common/package.sh

index 943915e31520bfd7dc24f00588de22805c8fa586..16cf4c501b47bca69f848e26908fdd0219fdf810 100755 (executable)
@@ -23,7 +23,11 @@ popd &>>${LOG}
 
 # Prepare package contents
 log 'Preparing box package contents'
-cp conf/${DISTRIBUTION} ${WORKING_DIR}/lxc-config
+if [ -f conf/${DISTRIBUTION}-${RELEASE} ]; then
+  cp conf/${DISTRIBUTION}-${RELEASE} ${WORKING_DIR}/lxc-config
+else
+  cp conf/${DISTRIBUTION} ${WORKING_DIR}/lxc-config
+fi
 cp conf/metadata.json ${WORKING_DIR}
 sed -i "s/<TODAY>/${NOW}/" ${WORKING_DIR}/metadata.json