mirror of
https://github.com/clearlinux/clr-init.git
synced 2026-08-19 04:07:31 +00:00
Make the copying of the files to create the folders if not exists
Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
This commit is contained in:
@@ -9,20 +9,21 @@ all: $(TARGET)
|
||||
gzip -9 $<
|
||||
|
||||
clr-init.cpio:
|
||||
set -e;
|
||||
mkdir -p initramfs/{sys,dev,proc,tmp,var,sysroot,usr/sbin,usr/bin,usr/lib/systemd/system-generators,usr/lib64,usr/lib64/multipath,run,root}
|
||||
if [ -d /usr/lib64/haswell/ ]; then \
|
||||
mkdir -p initramfs/usr/lib64/haswell;\
|
||||
fi
|
||||
for file in $(BINFILES); do \
|
||||
cp -f $$file initramfs/$$file;\
|
||||
cp -fa $$file initramfs/$$file;\
|
||||
done
|
||||
for file in $$(ldd $(BINFILES) | awk '{print $$3}' | grep "^/" | sort | uniq); do \
|
||||
file_path=$$(dirname $$file); \
|
||||
cp $$file initramfs/$$file_path/; \
|
||||
cp -a $$file initramfs/$$file_path/; \
|
||||
done
|
||||
if [ -d /usr/lib64/haswell/ ]; then \
|
||||
for lib in $$(ls initramfs/usr/lib64/haswell/); do \
|
||||
cp /usr/lib64/$$lib initramfs/usr/lib64/ ; \
|
||||
cp -a /usr/lib64/$$lib initramfs/usr/lib64/ ; \
|
||||
done \
|
||||
fi
|
||||
( cd initramfs && \
|
||||
|
||||
Reference in New Issue
Block a user