2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 11:12:04 +00:00
This commit is contained in:
bybai 2018-02-09 00:54:37 -05:00
parent 28586e3a83
commit 094d15e69c
2 changed files with 8 additions and 63 deletions

View File

@ -13,22 +13,20 @@ if [[ ! -f /etc/lsb-release ]]; then
exit 1
fi
. /etc/lsb-release
# Check the necessary packages before starting the build
declare -a packages=( "reprepro" "devscripts" "debhelper" "quilt" )
for package in ${packages[@]}; do
RC=`dpkg -l | grep $package >> /dev/null 2>&1; echo $?`
if [[ ${RC} != 0 ]]; then
echo "ERROR: Could not find $package, install using 'apt-get install $package' to continue"
# Check the necessary commands before starting the build
for cmd in dh dpkg-buildpackage
do
if ! type "$cmd" >/dev/null 2>&1
then
echo "ERROR: Required command, $package, not found." >&2
exit 1
fi
done
# Supported distributions
dists="saucy trusty utopic xenial"
pkg_name=$1
if [ -z "$pkg_name" ] || [ "$pkg_name" != "xcat-openbmc-py" ]; then
if [ "$pkg_name" != "xcat-openbmc-py" ]; then
printusage
exit 1
fi
@ -37,12 +35,6 @@ fi
old_pwd=`pwd`
cd `dirname $0`
curdir=`pwd`
export HOME=/root
WGET_CMD="wget"
if [ ! -z ${LOG} ]; then
WGET_CMD="wget -o ${LOG}"
fi
if [ -z "$REL" ]; then
t=${curdir%/src/xcat-core}
@ -50,14 +42,7 @@ if [ -z "$REL" ]; then
fi
if [ "$PROMOTE" != 1 ]; then
code_change=1
ver=`cat Version`
short_ver=`cat Version|cut -d. -f 1,2`
short_short_ver=`cat Version|cut -d. -f 1`
build_time=`date`
build_machine=`hostname`
commit_id=`git rev-parse --short HEAD`
commit_id_long=`git rev-parse HEAD`
echo "###############################"
echo "# Building xcat-openbmc-py package #"
@ -69,10 +54,9 @@ if [ "$PROMOTE" != 1 ]; then
xcat_release="snap$(date '+%Y%m%d%H%M')"
pkg_version="${ver}-${xcat_release}"
packages="xCAT-openbmc-py"
target_archs=(all)
for file in $packages
do
file_low=`echo $file | tr '[A-Z]' '[a-z]'`
file_low="${file,,}"
target_archs="all"
for target_arch in $target_archs
do

View File

@ -1,39 +0,0 @@
#!/bin/sh
# postinst script for xcat-openstack-baremetal
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0