force=false
checklive=false
+remove () {
+ local _list
+ local _file
+ _list=($(echo "$@"))
+ for _file in "${_list[@]}"; do
+ if [[ -f ${_file} ]]; then
+ rm -f "${_file}"
+ elif [[ -d ${_file} ]]; then
+ rm -rf "${_file}"
+ fi
+ done
+}
+
_help() {
echo "usage ${0} [options]"
echo
esac
done
+if [[ "${alterlive}" = true ]]; then
+ remove "${HOME}/.config/autostart/genicon.desktop"
+fi
if [[ "${checklive}" = true ]]; then
if ! pacman -Qq alterlinux-calamares 1> /dev/null 2> /dev/null; then
echo -n "${_desktop_dir}"
}
-remove () {
- local _list
- local _file
- _list=($(echo "$@"))
- for _file in "${_list[@]}"; do
- if [[ -f ${_file} ]]; then
- rm -f "${_file}"
- elif [[ -d ${_file} ]]; then
- rm -rf "${_file}"
- fi
- done
-}
-
#copy <コピー元> <コピー先>
copy() {
if [[ ! -f "${1}" ]]; then
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 "${HOME}/.config/autostart/genicon.desktop"
-fi