2
0
Преглед на файлове

Remove ynh_print_OFF/ON

ericgaspar преди 4 години
родител
ревизия
140608b2e6
променени са 3 файла, в които са добавени 4 реда и са изтрити 7 реда
  1. 1 1
      manifest.json
  2. 2 4
      scripts/install
  3. 1 2
      scripts/restore

+ 1 - 1
manifest.json

@@ -6,7 +6,7 @@
         "en": "Automatic backups",
         "fr": "Sauvegardes automatiques"
     },
-    "version": "1.3.1~ynh1",
+    "version": "1.3.1~ynh2",
     "url": "https://github.com/maniackcrudelis/archivist",
     "license": "GPL-3.0",
     "maintainer": {

+ 2 - 4
scripts/install

@@ -22,7 +22,7 @@ ynh_abort_if_errors
 #=================================================
 
 encrypt=$YNH_APP_ARG_ENCRYPT
-ynh_print_OFF; encryption_pwd=$YNH_APP_ARG_ENCRYPTION_PWD; ynh_print_ON
+encryption_pwd=$YNH_APP_ARG_ENCRYPTION_PWD
 core_backup=$YNH_APP_ARG_CORE_BACKUP
 apps_backup=$YNH_APP_ARG_APPS_BACKUP
 frequency="$YNH_APP_ARG_FREQUENCY"
@@ -38,9 +38,7 @@ final_path=/opt/yunohost/$app
 test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
 
 if [ $encrypt -eq 1 ]; then
-    ynh_print_OFF
     test -n "$encryption_pwd" || ynh_die --message="encryption_pwd can't be empty if you choose to enable encryption."
-    ynh_print_ON
 fi
 
 #=================================================
@@ -104,7 +102,7 @@ then
     encrypt=true
 
     passkey="$final_path/passkey"
-    ynh_print_OFF; echo "$encryption_pwd" > "$passkey"; ynh_print_ON
+    echo "$encryption_pwd" > "$passkey"
     chmod 400 "$passkey"
 else
     encrypt=false

+ 1 - 2
scripts/restore

@@ -31,8 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
 #=================================================
 ynh_script_progression --message="Validating restoration parameters..."
 
-test ! -d $final_path \
-    || ynh_die --message="There is already a directory: $final_path "
+test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
 
 #=================================================
 # STANDARD RESTORATION STEPS