mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 00:50:30 +00:00
update_zip
This commit is contained in:
parent
512b7760b8
commit
8eef922cb6
1 changed files with 9 additions and 2 deletions
|
@ -86,9 +86,16 @@ upgrade_zip() {
|
|||
echo "Unzip failed for package: $package_name"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
# Get the name of the package without the .zip extension for syncing
|
||||
local package_directory="${package_name%%-*}"
|
||||
local package_directory="${package_name%.zip}"
|
||||
package_directory="${package_directory%%-*}"
|
||||
|
||||
if [ "$unzipped_folder" != "/tmp/$package_directory/" ]; then
|
||||
mv "$unzipped_folder" "/tmp/$package_directory"
|
||||
else
|
||||
echo "The unzipped folder has the same name as the target folder."
|
||||
fi
|
||||
|
||||
# Sync the unzipped package to the desired location
|
||||
rsync -av "/tmp/$package_directory/" "$sync_to"
|
||||
|
|
Loading…
Reference in a new issue