Skip to content

Commit

Permalink
added module packing script
Browse files Browse the repository at this point in the history
  • Loading branch information
stubbedev committed Feb 27, 2024
1 parent 5a7fa6a commit cfd7720
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pack_module.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Set the name of the zip file
root_folder="clerkio64"
zip_file="$root_folder.zip"

# Create a temporary directory
temp_dir=$(mktemp -d)
orig_dir=$(realpath $(dirname $0))

rm -rf "./$zip_file"

# Create a parent folder named 'clerk' in the temporary directory and copy the contents into it
mkdir "$temp_dir/$root_folder" && cp -r * "$temp_dir/$root_folder"

cd "$temp_dir"

# Zip the 'clerk' folder
zip -r "$zip_file" "$root_folder"

mv "$zip_file" "$orig_dir/$zip_file"

echo "Packed Shopware6 Module"
ls | grep "*.zip"

# Clean up by removing the temporary directory
rm -rf "$temp_dir"

0 comments on commit cfd7720

Please sign in to comment.