You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cdist-mirror/hacking/v2-initramfs-from-os/filelist_to_dir.sh

19 lines
266 B

#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "$0 outdir"
exit 1
fi
outdir=$1; shift
mkdir -p "$outdir"
while read file; do
if [ -d "$file" ]; then
mkdir -p "$outdir$file"
else
cp --preserve=mode,links "$file" "$outdir$file"
fi
done