Add unzip-file-into-folder.sh file

This commit is contained in:
Matheus Albino Brunhara
2024-10-03 09:35:48 -03:00
parent 1bc6ce2c7f
commit 9f757cd492

View File

@@ -0,0 +1,11 @@
#!/bin/bash
ZIP_FILE=$1
TARGET_FOLDER=$2
CURRENT_TIMESTAMP=$(date +%s)
TARGET_FOLDER_BASENAME=$(basename $TARGET_FOLDER)
cp --recursive $TARGET_FOLDER $TARGET_FOLDER/../$TARGET_FOLDER_DIRNAME-$CURRENT_TIMESTAMP
unzip -o -d $TARGET_FOLDER $ZIP_FILE