Skip to content

Commit

Permalink
Fix cache function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ladar committed Nov 13, 2023
1 parent 5f0ee16 commit 31c90f4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion http/_generic.ppc.notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ boot
#### Update the HTTP port to match the Packer webserver then paste into serial0.

setparams 'Install AlmaLinux 9.3'
linux /ppc/ppc64/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-9-3-ppc64le-dvd ro inst.ks=http://192.168.121.1:8631/generic.alma9.vagrant.p64.ks inst.text net.ifnames=0 biosdevname=0 console=tty0
linux /ppc/ppc64/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-9-3-ppc64le-dvd ro inst.ks=http://192.168.121.1:8662/generic.alma9.vagrant.p64.ks inst.text net.ifnames=0 biosdevname=0
initrd /ppc/ppc64/initrd.img
boot

Expand Down
File renamed without changes.
File renamed without changes.
13 changes: 7 additions & 6 deletions robox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1231,47 +1231,48 @@ function iso() {
function cache() {

if [ ! -z ${CACHE_JOBS+x} ]; then CACHE_JOBS=PACKER_MAX_PROCS ; fi
if [ ! -z ${CACHE_JOBS+x} ]; then CACHE_JOBS=4 ; fi

unset PACKER_LOG ; unset LD_PRELOAD ; unset LD_LIBRARY_PATH ; unset PACKER_MAX_PROCS ; unset GOMAXPROCS ;

if [ "$1" == "x64" ]; then
( sudo renice -n +19 $BASHPID &>/dev/null || echo '' &>/dev/null ; sudo ionice -c 3 $BASHPID &>/dev/null || echo '' &>/dev/null ;
cat "$BASE/packer-cache-x64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j CACHE_JOBS --xapply \
cat "$BASE/packer-cache-x64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j $CACHE_JOBS --xapply \
packer build -only="{1}" "$BASE/packer-cache-x64.json" 2>&1 | \
grep --line-buffered -oE ".*: Trying.*| \=\>.*|.*: Download failed.*|.*: error downloading.*|^Build .*error.*" | \
grep --line-buffered -Ev 'checksum=sha25|Error creating disk' | sed --unbuffered 's/==/ =/g' | sed --unbuffered 's/vmware\-iso\.//g' ; tput sgr0 )
return 0
elif [ "$1" == "x32" ]; then
( sudo renice -n +19 $BASHPID &>/dev/null || echo '' &>/dev/null ; sudo ionice -c 3 $BASHPID &>/dev/null || echo '' &>/dev/null ;
cat "$BASE/packer-cache-x32.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j CACHE_JOBS --xapply \
cat "$BASE/packer-cache-x32.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j $CACHE_JOBS --xapply \
packer build -only="{1}" "$BASE/packer-cache-x32.json" 2>&1 | \
grep --line-buffered -oE ".*: Trying.*| \=\>.*|.*: Download failed.*|.*: error downloading.*|^Build .*error.*" | \
grep --line-buffered -Ev 'checksum=sha25|Error creating disk' | sed --unbuffered 's/==/ =/g' | sed --unbuffered 's/vmware\-iso\.//g' ; tput sgr0 )
return 0
elif [ "$1" == "a64" ]; then
( sudo renice -n +19 $BASHPID &>/dev/null || echo '' &>/dev/null ; sudo ionice -c 3 $BASHPID &>/dev/null || echo '' &>/dev/null ;
cat "$BASE/packer-cache-a64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j CACHE_JOBS --xapply \
cat "$BASE/packer-cache-a64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j $CACHE_JOBS --xapply \
packer build -only="{1}" "$BASE/packer-cache-a64.json" 2>&1 | \
grep --line-buffered -oE ".*: Trying.*| \=\>.*|.*: Download failed.*|.*: error downloading.*|^Build .*error.*" | \
grep --line-buffered -Ev 'checksum=sha25|Error creating disk' | sed --unbuffered 's/==/ =/g' | sed --unbuffered 's/vmware\-iso\.//g' ; tput sgr0 )
return 0
elif [ "$1" == "a32" ]; then
( sudo renice -n +19 $BASHPID &>/dev/null || echo '' &>/dev/null ; sudo ionice -c 3 $BASHPID &>/dev/null || echo '' &>/dev/null ;
cat "$BASE/packer-cache-x32.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j CACHE_JOBS --xapply \
cat "$BASE/packer-cache-x32.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j $CACHE_JOBS --xapply \
packer build -only="{1}" "$BASE/packer-cache-a32.json" 2>&1 | \
grep --line-buffered -oE ".*: Trying.*| \=\>.*|.*: Download failed.*|.*: error downloading.*|^Build .*error.*" | \
grep --line-buffered -Ev 'checksum=sha25|Error creating disk' | sed --unbuffered 's/==/ =/g' | sed --unbuffered 's/vmware\-iso\.//g' ; tput sgr0 )
return 0
elif [ "$1" == "p64" ]; then
( sudo renice -n +19 $BASHPID &>/dev/null || echo '' &>/dev/null ; sudo ionice -c 3 $BASHPID &>/dev/null || echo '' &>/dev/null ;
cat "$BASE/packer-cache-p64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j CACHE_JOBS --xapply \
cat "$BASE/packer-cache-p64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j $CACHE_JOBS --xapply \
packer build -only="{1}" "$BASE/packer-cache-p64.json" 2>&1 | \
grep --line-buffered -oE ".*: Trying.*| \=\>.*|.*: Download failed.*|.*: error downloading.*|^Build .*error.*" | \
grep --line-buffered -Ev 'checksum=sha25|Error creating disk' | sed --unbuffered 's/==/ =/g' | sed --unbuffered 's/vmware\-iso\.//g' ; tput sgr0 )
return 0
elif [ "$1" == "m64" ]; then
( sudo renice -n +19 $BASHPID &>/dev/null || echo '' &>/dev/null ; sudo ionice -c 3 $BASHPID &>/dev/null || echo '' &>/dev/null ;
cat "$BASE/packer-cache-m64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j CACHE_JOBS --xapply \
cat "$BASE/packer-cache-m64.json" | jq -r '.builders[] | .name | @text'| sort -V | parallel --ungroup -j $CACHE_JOBS --xapply \
packer build -only="{1}" "$BASE/packer-cache-m64.json" 2>&1 | \
grep --line-buffered -oE ".*: Trying.*| \=\>.*|.*: Download failed.*|.*: error downloading.*|^Build .*error.*" | \
grep --line-buffered -Ev 'checksum=sha25|Error creating disk' | sed --unbuffered 's/==/ =/g' | sed --unbuffered 's/vmware\-iso\.//g' ; tput sgr0 )
Expand Down

0 comments on commit 31c90f4

Please sign in to comment.