From 25b17a46c7d4ffabd6f56a98b3e10ea4f4271d46 Mon Sep 17 00:00:00 2001 From: Winded Date: Thu, 12 Jul 2018 20:23:36 +0300 Subject: [PATCH] Create workshop export script. close #8 --- workshop_export.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 workshop_export.sh diff --git a/workshop_export.sh b/workshop_export.sh new file mode 100644 index 0000000..80725df --- /dev/null +++ b/workshop_export.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Copy files to another folder that can be published to workshop + +INPUT="$1" +OUTPUT="$2" + +# Make output directory +mkdir -p "$OUTPUT" + +# Copy all files to output +cp -r "$INPUT/" "$OUTPUT/" + +# Remove non-lua files from output +find "$OUTPUT" -type f ! -name '*.lua' -delete + +# Copy addon.json +cp "$INPUT/addon.json" "$OUTPUT" + +echo "All done!" \ No newline at end of file