Skip to content

Commit e9b3d59

Browse files
committed
[fix] : Use simple remove function
1 parent b48761d commit e9b3d59

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

channels/releng/airootfs.any/root/customize_airootfs.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,11 @@ kernel_filename="${kernel_config_line[1]}"
5555
kernel_mkinitcpio_profile="${kernel_config_line[2]}"
5656

5757

58-
# Delete file only if file exists
59-
# remove <file1> <file2> ...
60-
function remove () {
61-
local _list
58+
# Show message when file is removed
59+
# remove <file> <file> ...
60+
remove() {
6261
local _file
63-
_list=($(echo "$@"))
64-
for _file in "${_list[@]}"; do
65-
if [[ -f ${_file} ]]; then
66-
rm -f "${_file}"
67-
elif [[ -d ${_file} ]]; then
68-
rm -rf "${_file}"
69-
fi
70-
echo "${_file} was deleted."
71-
done
62+
for _file in "${@}"; do echo "Removing ${_file}"; rm -rf "${_file}"; done
7263
}
7364

7465

0 commit comments

Comments
 (0)