mirror of
https://github.com/clearlinux/swupd-server.git
synced 2026-11-21 23:05:22 +00:00
Fix creating test files in subdirectories
Allow the filenames to contain directory names Signed-off-by: Icarus Sparry <icarus.w.sparry@intel.com>
This commit is contained in:
@@ -92,7 +92,10 @@ gen_file_plain() {
|
||||
local name="$3"
|
||||
|
||||
# Add plain text file into a bundle
|
||||
mkdir -p $DIR/image/$ver/$bundle/$(dirname "$name")
|
||||
case "$name" in
|
||||
(*"/"*) mkdir -p "$DIR/image/$ver/$bundle/${name%/*}" ;;
|
||||
(*) mkdir -p $DIR/image/$ver/$bundle ;;
|
||||
esac
|
||||
echo "$name" > $DIR/image/$ver/$bundle/"$name"
|
||||
}
|
||||
|
||||
@@ -102,7 +105,10 @@ gen_file_plain_change() {
|
||||
local name="$3"
|
||||
|
||||
# Add plain text file into a bundle
|
||||
mkdir -p $DIR/image/$ver/$bundle/$(dirname "$name")
|
||||
case "$name" in
|
||||
(*"/"*) mkdir -p "$DIR/image/$ver/$bundle/${name%/*}" ;;
|
||||
(*) mkdir -p $DIR/image/$ver/$bundle ;;
|
||||
esac
|
||||
echo "$ver $name" > $DIR/image/$ver/$bundle/"$name"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user