diff --git a/build/tasks/mkdeb-task.coffee b/build/tasks/mkdeb-task.coffee index 118d424d4..e7f3218c8 100644 --- a/build/tasks/mkdeb-task.coffee +++ b/build/tasks/mkdeb-task.coffee @@ -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) diff --git a/script/mkdeb b/script/mkdeb index 7ceff41c5..d327474e1 100755 --- a/script/mkdeb +++ b/script/mkdeb @@ -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