aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Lendacky <26725967+tlendacky@users.noreply.github.com>2022-05-11 12:46:26 -0500
committerGitHub <noreply@github.com>2022-05-11 12:46:26 -0500
commit8c668a342688ad945243c68015538dc6b79221da (patch)
tree0abed7ba74777b01797a29a5902232e83cde7ece
parentf4376e5887939ee8c8e0c62e835fd278b84140c9 (diff)
parent9239045e317fc1ea17fefb294f50ed49b02e1ec6 (diff)
downloadcachepc-amdsev-8c668a342688ad945243c68015538dc6b79221da.tar.gz
cachepc-amdsev-8c668a342688ad945243c68015538dc6b79221da.zip
Merge pull request #96 from JustPlay/sev-snp-devel
update build/common/install.sh to support debian (use ID or ID_LIKE)
-rwxr-xr-xbuild.sh2
-rwxr-xr-xcommon.sh2
-rwxr-xr-xinstall.sh4
3 files changed, 4 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 877a5ba..398b556 100755
--- a/build.sh
+++ b/build.sh
@@ -80,7 +80,7 @@ if [[ "$BUILD_PACKAGE" = "1" ]]; then
mkdir -p $OUTPUT_DIR/usr
cp -dpR $INSTALL_DIR $OUTPUT_DIR/usr/
- if [ "$ID_LIKE" = "debian" ]; then
+ if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
cp linux/linux-*-guest-*.deb $OUTPUT_DIR/linux/guest -v
cp linux/linux-*-host-*.deb $OUTPUT_DIR/linux/host -v
else
diff --git a/common.sh b/common.sh
index afa141b..1ccd72c 100755
--- a/common.sh
+++ b/common.sh
@@ -77,7 +77,7 @@ build_kernel()
# Build
run_cmd $MAKE >/dev/null
- if [ "$ID_LIKE" = "debian" ]; then
+ if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
run_cmd $MAKE bindeb-pkg
else
run_cmd $MAKE "RPMOPTS='--define \"_rpmdir .\"'" binrpm-pkg
diff --git a/install.sh b/install.sh
index 24a4eb0..c5572f0 100755
--- a/install.sh
+++ b/install.sh
@@ -3,13 +3,13 @@
[ -e /etc/os-release ] && . /etc/os-release
# This will install all the dependent packages for qemu and ovmf to run
-if [ "$ID_LIKE" = "debian" ]; then
+if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
apt-get -y install qemu ovmf
else
dnf install qemu edk2-ovmf
fi
-if [ "$ID_LIKE" = "debian" ]; then
+if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
dpkg -i linux/host/linux-image-*.deb
else
rpm -ivh linux/kernel-*.rpm