OSDN Git Service

[update] : check file
authorhayao <shun819.mail@gmail.com>
Sat, 26 Dec 2020 12:48:58 +0000 (21:48 +0900)
committerhayao <shun819.mail@gmail.com>
Sat, 26 Dec 2020 12:48:58 +0000 (21:48 +0900)
alterlinux-desktop-file/alterlinux-desktop-file

index e73c5c5..9bcf08c 100755 (executable)
@@ -82,6 +82,10 @@ desktop_dir="$(get_desktop_dir)"
 
 # calamaresのアイコン
 calamares="/usr/share/alterlinux/desktop-file/calamares.desktop"
+if [[ ! -f "${calamares}" ]]; then
+    echo "${calamares} was not found"
+    exit 1
+fi
 cp "${calamares}" "${desktop_dir}"
 os_name="$(
     if [[ -f "/etc/os-release" ]]; then