OSDN Git Service

rpm: detect a debian like distribution more effectively
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 22 Jun 2018 03:01:23 +0000 (11:01 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 22 Jun 2018 03:01:23 +0000 (11:01 +0800)
rpm/rpm.spec

index 4909dc1..0025c01 100644 (file)
@@ -32,7 +32,7 @@ sed -i "s|ANDROID_ROOT|/%{install_prefix}|; s|CMDLINE|%{cmdline}|" %{buildroot}%
 %post
 . /etc/os-release
 mkdir -p /%{install_prefix}/data
-if [ "$ID" = "debian" -o "$ID_LIKE" = "debian" ]; then
+if echo $ID $ID_LIKE | grep -q debian; then
        grubcfg=/boot/grub/custom.cfg
 elif mountpoint -q /boot/efi; then
        grubcfg=/boot/efi/EFI/$ID/custom.cfg && efi=efi