1
0
mirror of https://github.com/rancher/os.git synced 2025-06-21 12:37:04 +00:00
os/scripts/installer/seed-data
Ivan Mikushin f1c7aa38c1 add rancher/os (os-installer) Dockerfile
and installer scripts
2015-08-14 18:23:50 +05:00

23 lines
438 B
Bash
Executable File

#!/bin/bash
set -e -x
BASE_DIR=${1}
CLOUD_DATA=${2}
IFS=',' read -ra FILES <<< "${3}"
if [ -z ${BASE_DIR} ]; then
echo "Need base directory to place files" 1>&2
exit 1
fi
mkdir -p ${BASE_DIR}/lib/rancher/conf/cloud-config.d
cp ${CLOUD_DATA} ${BASE_DIR}/lib/rancher/conf/cloud-config.d/
for f in ${FILES[@]}; do
IFS=":" read s d <<< "${f}"
mkdir -p $(dirname ${BASE_DIR}/${d})
cp -a -T ${s} ${BASE_DIR}/${d}
done