-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
311 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,37 @@ | ||
NAME=$(node -p "require('./package.json').displayName") | ||
PLATFORM="linux" | ||
VERSION=$(node -p "require('./package.json').version") | ||
for file in out/make/*.*; do mv "$file" "out/make/$NAME-$PLATFORM-$VERSION.${file##*.}"; done | ||
#!/bin/bash | ||
|
||
# A POSIX variable | ||
OPTIND=1 # Reset in case getopts has been used previously in the shell. | ||
BASEDIR="." # Path to source code base directory (ie. path containing package.json) | ||
PLATFORM="" | ||
|
||
while getopts ":p:d:" opt; do | ||
case $opt in | ||
p) | ||
PLATFORM="$OPTARG" | ||
;; | ||
d) | ||
BASEDIR="$OPTARG" | ||
;; | ||
\?) | ||
echo "Invalid option: -$OPTARG" >&2 | ||
exit 1 | ||
;; | ||
:) | ||
echo "Option -$OPTARG requires an argument." >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
NAME=$(node -p "require('$BASEDIR/package.json').displayName") | ||
VERSION=$(node -p "require('$BASEDIR/package.json').version") | ||
MAKEDIR="$BASEDIR/out/make" | ||
FINALDIR="$MAKEDIR/final" | ||
|
||
mkdir -p "$FINALDIR" | ||
|
||
for file in $(find "$MAKEDIR" -type f -name "*.*" ! -name ".DS*"); do cp "${file}" "$FINALDIR/$NAME-$PLATFORM-$VERSION.${file##*.}"; done | ||
|
||
echo "Files Created" | ||
for file in $(find "$FINALDIR" -type f); do echo "${file}"; done |
Oops, something went wrong.