🐧 Add mkdeb task to create debian package.

This commit is contained in:
Cheng Zhao
2014-03-24 18:44:44 +08:00
parent 03b9a25897
commit 67d8db8b9a
3 changed files with 53 additions and 0 deletions

21
script/mkdeb Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# mkdeb version control-file-path
SCRIPT=`readlink -f "$0"`
ROOT=`readlink -f $(dirname $SCRIPT)/..`
cd $ROOT
VERSION="$1"
CONTROL_FILE="$2"
TARGET_ROOT="`mktemp -d`"
TARGET="$TARGET_ROOT/atom-$VERSION"
mkdir -p "$TARGET/usr"
env INSTALL_PREFIX="$TARGET/usr" script/grunt install
mkdir -p "$TARGET/DEBIAN"
mv "$CONTROL_FILE" "$TARGET/DEBIAN/control"
dpkg-deb -b "$TARGET"
mv "$TARGET_ROOT/atom-$VERSION.deb" /tmp/atom-build/
rm -rf $TARGET_ROOT