diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-04-04 21:20:23 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2017-04-04 21:20:23 +0000 |
commit | c2d3c603f576085616dcd7ca77c4759a44adce58 (patch) | |
tree | c518908389d20819a7db840b655619e64fcf592b /usr.sbin/syspatch | |
parent | 02d126e9fd4c95628f685f14e3f7b4d129f3edae (diff) |
Also remove non syspatch hidden files/dirs.
Diffstat (limited to 'usr.sbin/syspatch')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 <ajacoutot@openbsd.org> # @@ -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} |