Currently, when running mfh with a flag like --help the user gets
a confusing error message from expr(1) like the following:
> expr: illegal option -- -
> expr: usage: expr [-e] expression
>
> revision "--help" should be a number
This is not helpful. Instead, make sure that any arguments specified by the
user are handled properly by expr(1). This results in a much cleaner error
message:
> revision "--help" should be a number
Reviewed by: mat
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D25958
- remove unused clean() function, trap does it
- fix race around mktemp/setting up rm trap
- rename filelist to dirlist so it matches its purpose
- move defaults up front to the script
- misc. minor edits
PR: 246336
Approved by: portmgr (mat@)
Differential Revision: https://reviews.freebsd.org/D24789
SC2068: Double quote array expansions to avoid re-splitting elements.
SC2034: revs appears unused. Verify it or export it.
SC2039: In POSIX sh, XXX is undefined.
type -> command -v
echo -n -> printf
read -p -> printf + read
SC2162: read without -r will mangle backslashes.
SC2086: Double quote to prevent globbing and word splitting.
Sponsored by: Absolight
- use proper quoting
- use fewer svn invocations
- optionally drop to a shell before committing,
to manually fix up a botched merge.
- svnserver can be overridden in the environment.
- Finally, we use sh's trap builtin to make sure we always clean up.
PR: 186256
Approved by: portmgr (bapt@)
- Use a variable for the Subversion server
- Consistently use ${} around variables
- Bail out if neither svn(1) nor svnlite(1) are installed
Approved by: bapt