diff options
author | Andrew Cady <d@jerkface.net> | 2017-08-30 23:15:45 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2017-08-30 23:15:45 -0400 |
commit | a75ccbd6dd458ac5234ba59437550da27aaa44b4 (patch) | |
tree | 57ecc49c4b347faeb63dab835678061849761f9e /multistrap | |
parent | d8301b27dcda3bb9a66f145e3181c6ea781567fe (diff) |
selfstrap: minor refactor
Diffstat (limited to 'multistrap')
-rwxr-xr-x | multistrap/selfstrap | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/multistrap/selfstrap b/multistrap/selfstrap index c693a4e..165a921 100755 --- a/multistrap/selfstrap +++ b/multistrap/selfstrap | |||
@@ -239,7 +239,19 @@ apt_extract() | |||
239 | { | 239 | { |
240 | apt_get -d -yqq install "$@" | 240 | apt_get -d -yqq install "$@" |
241 | actions=$(mktemp) || die 'mktemp failed' | 241 | actions=$(mktemp) || die 'mktemp failed' |
242 | apt_get -s -yqq install "$@" | tee "$actions" | while read line; do | 242 | apt_get -s -yqq install "$@" | tee "$actions" | dpkg_extract_from_apt |
243 | |||
244 | if [ "$EXTRACT_DPKG_INFO" ]; then | ||
245 | install_etc_passwd | ||
246 | dpkg_inst_from_apt < "$actions" | ||
247 | fi | ||
248 | |||
249 | rm "$actions" | ||
250 | } | ||
251 | |||
252 | dpkg_extract_from_apt() | ||
253 | { | ||
254 | while read line; do | ||
243 | 255 | ||
244 | parse_apt_noact_line "$line" || die "unexpected output from apt-get: $line" | 256 | parse_apt_noact_line "$line" || die "unexpected output from apt-get: $line" |
245 | 257 | ||
@@ -265,11 +277,6 @@ apt_extract() | |||
265 | *) die "impossible" ;; | 277 | *) die "impossible" ;; |
266 | esac | 278 | esac |
267 | done | 279 | done |
268 | if [ "$EXTRACT_DPKG_INFO" ]; then | ||
269 | install_etc_passwd | ||
270 | dpkg_inst_from_apt < "$actions" | ||
271 | fi | ||
272 | rm "$actions" | ||
273 | } | 280 | } |
274 | 281 | ||
275 | install_etc_passwd() | 282 | install_etc_passwd() |