]> git.wh0rd.org Git - home.git/commitdiff
installkernel: improve s390 logic
authorMike Frysinger <vapier@gentoo.org>
Tue, 24 Mar 2015 17:32:20 +0000 (13:32 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 24 Mar 2015 17:32:20 +0000 (13:32 -0400)
.bin/installkernel

index 2a598d529eb70f11d90298467fc798072539ca6a..6180eb6f0a8f09ad7f23e679ec6e862b1b7387ed 100755 (executable)
@@ -21,9 +21,19 @@ case ${img} in
        ;;
 
 */s390/*)
+       pushd /lib/modules >/dev/null
+       for v in * ; do
+               [[ -d ${v} ]] || continue
+               [[ -e ${dir}/image-${v} ]] && continue
+               echo rm -rf ${PWD}/${v}
+       done
+       popd >/dev/null
+
+       rm -f ${dir}/{config,System.map}-${ver}.xz
        cp ${img} ${dir}/image-${ver}
        cp ${map} ${dir}/System.map-${ver}
        cp .config ${dir}/config-${ver}
+       xz -9f ${dir}/{config,System.map}-${ver}
        ln -sf image-${ver} ${dir}/image
        zipl
        exit 0