show_cols() (a cheap column(1) version) has its own
local _cdir=/tmp/i/cdir
so replace one hardcoded occurence with the variable.
While here, fold a long loop into a single printf for readability:
$ ALLSETS='bsd bsd.rd base72.tgz ...'
$ for _n in $ALLSETS; do echo $_n; done
bsd
bsd.rd
base72.tgz
...
$ printf '%s\n' $ALLSETS
bsd
bsd.rd
base72.tgz
...
OK? (for after release)
Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1205
diff -u -p -r1.1205 install.sub
--- install.sub 19 Sep 2022 15:40:36 -0000 1.1205
+++ install.sub 20 Sep 2022 14:06:40 -0000
@@ -191,7 +191,7 @@ show_cols() {
rm -rf -- $_cdir/*
while read _l; do
[[ -n $_l ]] || continue
- mkdir -p /tmp/i/cdir/"$_l"
+ mkdir -p $_cdir/"$_l"
_clist[${#_clist[*]}]="$_l"
done
(cd $_cdir; ls -Cdf "${_clist[@]}")
@@ -1573,7 +1573,7 @@ install_files() {
echo "and found no $OBSD sets. The set names looked for were:"
let COLUMNS=_col-8
- for _n in $ALLSETS; do echo $_n; done | show_cols | sed 's/^/
/'
+ printf '%s\n' $ALLSETS | show_cols | sed 's/^/ /'
COLUMNS=$_col
$AI && exit 1