mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 20:30:56 +00:00
Minor tweaks for the debian packaging script of xcat-genesis-base
This commit is contained in:
@ -1,7 +1,15 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This is a dirty script for convert an xCAT-genesis-base rpm package to
|
||||
# a debian package.
|
||||
#
|
||||
|
||||
# xCAT-genesis-base-x86_64-2.13.10-snap201801090246.noarch.rpm
|
||||
RPM_PACKAGE="$1"
|
||||
[ -n "${RPM_PACKAGE}" ] ||
|
||||
echo "Usage: ${0##*/} /path/to/xCAT-genesis-base.rpm" && exit 0
|
||||
|
||||
set -x
|
||||
|
||||
[ -n "${RPM_PACKAGE}" ] || exit 1
|
||||
[ -f "${RPM_PACKAGE}" ] || exit 1
|
||||
@ -29,11 +37,16 @@ fi
|
||||
cat >"${EXTRACT_DIR}/debian/preinst" <<-EOF
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/bin
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/sbin
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib64
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/var/run
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/bin ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/bin
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/sbin ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/sbin
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib64 ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/lib64
|
||||
[ -d /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/var/run ] &&
|
||||
rm -rf /opt/xcat/share/xcat/netboot/genesis/${PACKAGE_ARCH}/fs/var/run
|
||||
EOF
|
||||
|
||||
( cd "${EXTRACT_DIR}" && debian/rules binary )
|
||||
|
Reference in New Issue
Block a user