Skip to content

Commit e73cdc3

Browse files
committed
common-apps: redo trim for windows
1 parent d041fdf commit e73cdc3

File tree

1 file changed

+35
-13
lines changed

1 file changed

+35
-13
lines changed

scripts/common-apps-functions-source.sh

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,41 @@
1717
function trim_qemu_arm()
1818
{
1919
(
20-
cd "${APP_PREFIX}/share/qemu"
21-
22-
find . -type f -maxdepth 2 \
23-
-not \( -path './efi-*.rom' -prune \) \
24-
-not \( -path './npcm7xx_bootrom.bin' -prune \) \
25-
-not \( -path './edk2-arm*.*' -prune \) \
26-
-not \( -path './edk2-aarch64*.*' -prune \) \
27-
-not \( -path './edk2-licenses.*' -prune \) \
28-
-not \( -path './firmware/*-edk2-arm*.*' -prune \) \
29-
-not \( -path './firmware/*-edk2-aarch64*.*' -prune \) \
30-
-not \( -path './keymaps/*' -prune \) \
31-
-exec rm -rf {} \;
32-
20+
if [ "${TARGET_PLATFORM}" == "win32" ]
21+
then
22+
cd "${APP_PREFIX}/share"
23+
find . -maxdepth 2 \
24+
-not \( -path './applications' -prune \) \
25+
-not \( -path './applications/*' -prune \) \
26+
-not \( -path './icons' -prune \) \
27+
-not \( -path './icons/*' -prune \) \
28+
-not \( -path './efi-*.rom' -prune \) \
29+
-not \( -path './npcm7xx_bootrom.bin' -prune \) \
30+
-not \( -path './edk2-arm*.*' -prune \) \
31+
-not \( -path './edk2-aarch64*.*' -prune \) \
32+
-not \( -path './edk2-licenses.*' -prune \) \
33+
-not \( -path './firmware' -prune \) \
34+
-not \( -path './firmware/*-edk2-arm*.*' -prune \) \
35+
-not \( -path './firmware/*-edk2-aarch64*.*' -prune \) \
36+
-not \( -path './keymaps' -prune \) \
37+
-not \( -path './keymaps/*' -prune \) \
38+
-not \( -path './legacy' -prune \) \
39+
-not \( -path './legacy/*' -prune \) \
40+
-exec rm -rf {} \;
41+
42+
else
43+
cd "${APP_PREFIX}/share/qemu"
44+
find . -type f -maxdepth 2 \
45+
-not \( -path './efi-*.rom' -prune \) \
46+
-not \( -path './npcm7xx_bootrom.bin' -prune \) \
47+
-not \( -path './edk2-arm*.*' -prune \) \
48+
-not \( -path './edk2-aarch64*.*' -prune \) \
49+
-not \( -path './edk2-licenses.*' -prune \) \
50+
-not \( -path './firmware/*-edk2-arm*.*' -prune \) \
51+
-not \( -path './firmware/*-edk2-aarch64*.*' -prune \) \
52+
-not \( -path './keymaps/*' -prune \) \
53+
-exec rm -rf {} \;
54+
fi
3355
)
3456
}
3557

0 commit comments

Comments
 (0)