| @@ -1,16 +1,16 @@ | | | @@ -1,16 +1,16 @@ |
1 | #!/bin/sh | | 1 | #!/bin/sh |
2 | # | | 2 | # |
3 | # $NetBSD: postinstall.in,v 1.30 2020/06/29 23:04:57 riastradh Exp $ | | 3 | # $NetBSD: postinstall.in,v 1.31 2020/07/07 12:01:21 simonb Exp $ |
4 | # | | 4 | # |
5 | # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. | | 5 | # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. |
6 | # All rights reserved. | | 6 | # All rights reserved. |
7 | # | | 7 | # |
8 | # This code is derived from software contributed to The NetBSD Foundation | | 8 | # This code is derived from software contributed to The NetBSD Foundation |
9 | # by Luke Mewburn. | | 9 | # by Luke Mewburn. |
10 | # | | 10 | # |
11 | # Redistribution and use in source and binary forms, with or without | | 11 | # Redistribution and use in source and binary forms, with or without |
12 | # modification, are permitted provided that the following conditions | | 12 | # modification, are permitted provided that the following conditions |
13 | # are met: | | 13 | # are met: |
14 | # 1. Redistributions of source code must retain the above copyright | | 14 | # 1. Redistributions of source code must retain the above copyright |
15 | # notice, this list of conditions and the following disclaimer. | | 15 | # notice, this list of conditions and the following disclaimer. |
16 | # 2. Redistributions in binary form must reproduce the above copyright | | 16 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -277,27 +277,27 @@ check_ids() | | | @@ -277,27 +277,27 @@ check_ids() |
277 | number[id], value[id]) | | 277 | number[id], value[id]) |
278 | start++; | | 278 | start++; |
279 | } | | 279 | } |
280 | } | | 280 | } |
281 | ' "$@" < "${_file}")" || return 1 | | 281 | ' "$@" < "${_file}")" || return 1 |
282 | if [ -n "${_missing}" ]; then | | 282 | if [ -n "${_missing}" ]; then |
283 | msg "Error ${_type}${_notfixed}:" $(echo ${_missing}) | | 283 | msg "Error ${_type}${_notfixed}:" $(echo ${_missing}) |
284 | msg "Use the following as a template:" | | 284 | msg "Use the following as a template:" |
285 | set -- ${_missing} | | 285 | set -- ${_missing} |
286 | while [ $# -gt 0 ] | | 286 | while [ $# -gt 0 ] |
287 | do | | 287 | do |
288 | ${GREP} -E "^${1}:" ${_srcfile} | | 288 | ${GREP} -E "^${1}:" ${_srcfile} |
289 | shift 2 | | 289 | shift 2 |
290 | done | | 290 | done | sort -t: -k3n |
291 | msg "and adjust if necessary." | | 291 | msg "and adjust if necessary." |
292 | return 1 | | 292 | return 1 |
293 | fi | | 293 | fi |
294 | return 0 | | 294 | return 0 |
295 | } | | 295 | } |
296 | | | 296 | |
297 | # populate_dir op onlynew src dest mode file [file ...] | | 297 | # populate_dir op onlynew src dest mode file [file ...] |
298 | # Perform op ("check" or "fix") on files in src/ against dest/ | | 298 | # Perform op ("check" or "fix") on files in src/ against dest/ |
299 | # If op = "check" display missing or changed files, optionally with diffs. | | 299 | # If op = "check" display missing or changed files, optionally with diffs. |
300 | # If op != "check" copies any missing or changed files. | | 300 | # If op != "check" copies any missing or changed files. |
301 | # If onlynew evaluates to true, changed files are ignored. | | 301 | # If onlynew evaluates to true, changed files are ignored. |
302 | # Returns 0 if ok, 1 otherwise. | | 302 | # Returns 0 if ok, 1 otherwise. |
303 | # | | 303 | # |