mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-01-23 02:34:26 +00:00
adding basic docker builder
This commit is contained in:
parent
edccba50f4
commit
eabb50e24d
3 changed files with 71 additions and 1 deletions
20
docker-build-root/dumper.sh
Executable file
20
docker-build-root/dumper.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#! /bin/sh
|
||||
|
||||
# check for dump dir
|
||||
if [ -d /buildout ]; then
|
||||
# if there are no files in that directory use 777 perms as root
|
||||
if [ `find /buildout -prune -empty 2>/dev/null` ]; then
|
||||
/bin/mkdir -p /buildout/buildout
|
||||
/bin/cp -r /mnt/* /buildout/buildout/
|
||||
/bin/chmod 777 -R /buildout/buildout
|
||||
# match the ownership of the first file we see
|
||||
else
|
||||
PERMS=`/usr/bin/find /buildout/* -print -quit |xargs stat -c "%u:%g"`
|
||||
/bin/mkdir -p /buildout/buildout
|
||||
/bin/cp -r /mnt/* /buildout/buildout/
|
||||
/bin/chown $PERMS -R /buildout/buildout
|
||||
fi
|
||||
else
|
||||
/bin/echo "/buildout not found exiting"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue