OSDN Git Service

[fix] : Fixed remove function
authorhayao <shun819.mail@gmail.com>
Fri, 1 Jan 2021 06:44:02 +0000 (15:44 +0900)
committerhayao <shun819.mail@gmail.com>
Fri, 1 Jan 2021 06:44:02 +0000 (15:44 +0900)
alterlinux-desktop-file/alterlinux-desktop-file

index 4dec5b4..b8eb7db 100755 (executable)
@@ -12,6 +12,19 @@ alterlive=false
 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
@@ -102,19 +115,6 @@ get_desktop_dir() {
     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