done
}
-desktop_dir="$(get_desktop_dir)"
+#copy <コピー元> <コピー先>
+copy() {
+ if [[ ! -f "${1}" ]]; then
+ echo "${1} was not found" >&2
+ exit 1
+ fi
+ if [[ -f "${2}/$(basename "${1}")" ]] || [[ -f "${2}" ]] && [[ "${force}" = false ]]; then
+ echo "File already exists" >&2
+ exit 1
+ fi
-# calamaresのアイコン
-calamares="/usr/share/alterlinux/desktop-file/calamares.desktop"
-desktop_icon="${desktop_dir}/$(basename "${calamares}")"
+ cp "${1}" "${2}"
+}
-if [[ ! -f "${calamares}" ]]; then
- echo "${calamares} was not found" >&2
- exit 1
-fi
+desktop_dir="$(get_desktop_dir)"
-if [[ -f "${desktop_icon}" ]] && [[ "${force}" = false ]]; then
- echo "File already exists" >&2
- exit 1
-fi
-cp "${calamares}" "${desktop_dir}"
+# calamaresのアイコン
+source_file="/usr/share/alterlinux/desktop-file/calamares.desktop"
+desktop_icon="${desktop_dir}/$(basename "${source_file}")"
+copy "${source_file}" "${desktop_dir}"
os_name="$(
if [[ -f "/etc/os-release" ]]; then
source "/etc/os-release"
sed -i "s/%OS_NAME%/${os_name}/g" "${desktop_icon}"
+# welcome-page
+source_file="/usr/share/alterlinux/desktop-file/welcome-to-alter.desktop"
+desktop_icon="${desktop_dir}/$(basename "${source_file}")"
+copy "${source_file}" "${desktop_dir}"
+
+
if [[ "${alterlive}" = true ]]; then
remove ~/.config/autostart/genicon.desktop
fi
--- /dev/null
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Icon=/usr/share/icons/hicolor/scalable/apps/alter.svg
+Exec=/usr/bin/alterlinux-welcome-page
+Type=Application
+StartupNotify=false
+Terminal=false
+Hidden=false
+
+Name=Welcome to Alter Linux
+Comment=Displays the Alter Linux welcome page.
+
+Name[ja]=Alter Linuxへようこそ
+GenericName[ja]=Alter Linuxへようこそ
+Comment[ja]=Alter Linuxの利用に役立つページです。