From: ajacoutot Date: Tue, 4 Apr 2017 21:20:22 +0000 (+0000) Subject: Also remove non syspatch hidden files/dirs. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f51554d23b4d4750d5d711da2ab85c7e52b4cc65;p=openbsd Also remove non syspatch hidden files/dirs. --- diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index a7aa06f74e5..42059499cc8 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.93 2017/03/31 16:02:31 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.94 2017/04/04 21:20:22 ajacoutot Exp $ # # Copyright (c) 2016 Antoine Jacoutot # @@ -230,7 +230,7 @@ sp_cleanup() local _d _k _m # remove non matching release /var/syspatch/ content - for _d in ${_PDIR}/*; do + for _d in ${_PDIR}/{.[!.],}*; do [[ -e ${_d} ]] || continue [[ ${_d##*/} == ${_OSrev}-+([[:digit:]])_+([[:alnum:]]|_) ]] && [[ -f ${_d}/rollback.tgz ]] || rm -r ${_d}