Do not hard code build dir.

This commit is contained in:
Cheng Zhao 2014-03-24 18:50:58 +08:00
parent 67d8db8b9a
commit 6f068f14fd
2 changed files with 5 additions and 3 deletions

View File

@ -20,5 +20,5 @@ module.exports = (grunt) ->
fs.writeFileSync(control, filled)
cmd = path.join('script', 'mkdeb')
args = [version, control]
args = [version, control, grunt.config.get('atom.buildDir')]
spawn({cmd, args}, done)

View File

@ -1,5 +1,5 @@
#!/bin/bash
# mkdeb version control-file-path
# mkdeb version control-file-path deb-file-path
SCRIPT=`readlink -f "$0"`
ROOT=`readlink -f $(dirname $SCRIPT)/..`
@ -7,6 +7,8 @@ cd $ROOT
VERSION="$1"
CONTROL_FILE="$2"
DEB_PATH="$3"
TARGET_ROOT="`mktemp -d`"
TARGET="$TARGET_ROOT/atom-$VERSION"
@ -17,5 +19,5 @@ mkdir -p "$TARGET/DEBIAN"
mv "$CONTROL_FILE" "$TARGET/DEBIAN/control"
dpkg-deb -b "$TARGET"
mv "$TARGET_ROOT/atom-$VERSION.deb" /tmp/atom-build/
mv "$TARGET_ROOT/atom-$VERSION.deb" "$DEB_PATH"
rm -rf $TARGET_ROOT