[NEW] package-code script to package projects nicely.
This commit is contained in:
parent
ec7ed4969c
commit
f70a2f6d8b
1 changed files with 18 additions and 0 deletions
18
package-code
Executable file
18
package-code
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
ORIG_DIR=`basename "${PWD}"`
|
||||||
|
CODE_DIR="${ORIG_DIR}-project"
|
||||||
|
ZIP_FILE="${CODE_DIR}.zip"
|
||||||
|
|
||||||
|
echo "Zipping project in ${PWD}..."
|
||||||
|
|
||||||
|
pushd .. >/dev/null
|
||||||
|
cp -a "${ORIG_DIR}" "${CODE_DIR}"
|
||||||
|
pushd "${CODE_DIR}" >/dev/null
|
||||||
|
rm -rf **/.git* **/build generated/
|
||||||
|
popd >/dev/null
|
||||||
|
zip -T -r -y "${ZIP_FILE}" "${CODE_DIR}"
|
||||||
|
rm -rf "${CODE_DIR}"
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
echo "done, project is in ${ZIP_FILE}"
|
||||||
Loading…
Reference in a new issue