ソースを参照

Merge pull request #12 from YunoHost-Apps/testing

Fix ynh-3 compatibility
Maniack Crudelis 7 年 前
コミット
5998ea535b
3 ファイル変更30 行追加0 行削除
  1. 10 0
      scripts/install
  2. 10 0
      scripts/restore
  3. 10 0
      scripts/upgrade

+ 10 - 0
scripts/install

@@ -118,6 +118,16 @@ then
 	done <<< "$(yunohost app list -i | grep id: | sed 's/.*id: //')"
 fi
 
+#=================================================
+# STRETCH COMPATIBILITY
+#=================================================
+
+if is_stretch
+then
+	ynh_replace_string "yunohost backup create --ignore-apps" "yunohost backup create" "$final_path/archivist.sh"
+	ynh_replace_string "yunohost backup create --ignore-system" "yunohost backup create" "$final_path/archivist.sh"
+fi
+
 #=================================================
 # SET THE CRON FILE
 #=================================================

+ 10 - 0
scripts/restore

@@ -39,6 +39,16 @@ test ! -d $final_path \
 
 ynh_restore_file "$final_path"
 
+#=================================================
+# STRETCH COMPATIBILITY
+#=================================================
+
+if is_stretch
+then
+	ynh_replace_string "yunohost backup create --ignore-apps" "yunohost backup create" "$final_path/archivist.sh"
+	ynh_replace_string "yunohost backup create --ignore-system" "yunohost backup create" "$final_path/archivist.sh"
+fi
+
 #=================================================
 # SPECIFIC RESTORATION
 #=================================================

+ 10 - 0
scripts/upgrade

@@ -58,6 +58,16 @@ fi
 
 #=================================================
 # SPECIFIC UPGRADE
+#=================================================
+# STRETCH COMPATIBILITY
+#=================================================
+
+if is_stretch
+then
+	ynh_replace_string "yunohost backup create --ignore-apps" "yunohost backup create" "$final_path/archivist.sh"
+	ynh_replace_string "yunohost backup create --ignore-system" "yunohost backup create" "$final_path/archivist.sh"
+fi
+
 #=================================================
 # UPDATE THE CRON FILE
 #=================================================