Reviewed-on: #1 Co-authored-by: Gonçalo Correia <goncalojoaocorreia@gmail.com> Co-committed-by: Gonçalo Correia <goncalojoaocorreia@gmail.com>
17 lines
445 B
Bash
Executable file
17 lines
445 B
Bash
Executable file
#!/bin/bash
|
|
|
|
ADDON_NAME="AltSystem"
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
OUTPUT_DIR="$(mktemp -d)"
|
|
OUTPUT_FILE="$OUTPUT_DIR/$ADDON_NAME.zip"
|
|
STAGING_DIR="$(mktemp -d)"
|
|
|
|
mkdir -p "$STAGING_DIR/$ADDON_NAME"
|
|
rsync -a --exclude='.DS_Store' --exclude='__MACOSX' --exclude='.git' --exclude='docs' "$SCRIPT_DIR/" "$STAGING_DIR/$ADDON_NAME/"
|
|
|
|
cd "$STAGING_DIR" && \
|
|
zip -r "$OUTPUT_FILE" "$ADDON_NAME"
|
|
|
|
rm -rf "$STAGING_DIR"
|
|
|
|
echo "$OUTPUT_FILE"
|