Code cleanup
This commit is contained in:
parent
293d4b34e8
commit
a1f2e9a113
1 changed files with 6 additions and 4 deletions
4
arkdep
4
arkdep
|
@ -699,6 +699,7 @@ deploy () {
|
||||||
# Create directory using unique deployment name
|
# Create directory using unique deployment name
|
||||||
mkdir -p $arkdep_dir/deployments/${data[0]} || cleanup_and_quit 'Failed to create deployment directory'
|
mkdir -p $arkdep_dir/deployments/${data[0]} || cleanup_and_quit 'Failed to create deployment directory'
|
||||||
|
|
||||||
|
# Extra image from tarball to stdin and receive
|
||||||
tar -xOf $arkdep_dir/cache/${data[0]}.tar.${data[1]} "./${data[0]}-rootfs.img" |
|
tar -xOf $arkdep_dir/cache/${data[0]}.tar.${data[1]} "./${data[0]}-rootfs.img" |
|
||||||
btrfs receive $arkdep_dir/deployments/${data[0]} ||
|
btrfs receive $arkdep_dir/deployments/${data[0]} ||
|
||||||
cleanup_and_quit 'Failed to receive root'
|
cleanup_and_quit 'Failed to receive root'
|
||||||
|
@ -713,6 +714,7 @@ deploy () {
|
||||||
btrfs property set -f -ts $arkdep_dir/deployments/${data[0]}/rootfs ro false ||
|
btrfs property set -f -ts $arkdep_dir/deployments/${data[0]}/rootfs ro false ||
|
||||||
cleanup_and_quit 'Failed to unlock root to write etc'
|
cleanup_and_quit 'Failed to unlock root to write etc'
|
||||||
|
|
||||||
|
# Extra image from tarball to stdin and receive
|
||||||
tar -xOf $arkdep_dir/cache/${data[0]}.tar.${data[1]} "./${data[0]}-etc.img" |
|
tar -xOf $arkdep_dir/cache/${data[0]}.tar.${data[1]} "./${data[0]}-etc.img" |
|
||||||
btrfs receive $arkdep_dir/deployments/${data[0]}/rootfs/ ||
|
btrfs receive $arkdep_dir/deployments/${data[0]}/rootfs/ ||
|
||||||
cleanup_and_quit 'Failed to receive etc'
|
cleanup_and_quit 'Failed to receive etc'
|
||||||
|
@ -727,7 +729,7 @@ deploy () {
|
||||||
# Write the var image
|
# Write the var image
|
||||||
printf '\e[1;34m-->\e[0m\e[1m Writing var\e[0m\n'
|
printf '\e[1;34m-->\e[0m\e[1m Writing var\e[0m\n'
|
||||||
|
|
||||||
# Extract the var image if not yet extracted
|
# Extra image from tarball to stdin and receive
|
||||||
tar -xOf $arkdep_dir/cache/${data[0]}.tar.${data[1]} "./${data[0]}-var.img" |
|
tar -xOf $arkdep_dir/cache/${data[0]}.tar.${data[1]} "./${data[0]}-var.img" |
|
||||||
btrfs receive $arkdep_dir/deployments/${data[0]}/rootfs/ ||
|
btrfs receive $arkdep_dir/deployments/${data[0]}/rootfs/ ||
|
||||||
cleanup_and_quit 'Failed to receive var'
|
cleanup_and_quit 'Failed to receive var'
|
||||||
|
|
Loading…
Add table
Reference in a new issue