Skip to content

Commit 7434201

Browse files
attempt to fix compress scripts
1 parent 21ebcc0 commit 7434201

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

plugins/functions

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ do_chroot_ae() {
226226

227227
do_compress() {
228228
#compression
229+
export TARGET_FILE
230+
TARGET_FILE="$(basename ${chroot_dir})"
229231
if [ -n "$OVERRIDER_COMPRESSION_TYPE" ]; then
230232
case $1 in
231233
bzip2) do_tar_bzip ;;
@@ -254,8 +256,8 @@ do_tar_lz4() {
254256

255257
do_chroot_ae \
256258
"$chroot_dir" \
257-
"/gz-packer.sh ${chroot-dir}.lz"
258-
$SUDO cp "${chroot_dir}/${chroot_dir}.lz" out
259+
"/gz-packer.sh ${TARGET_FILE}.lz"
260+
$SUDO cp "${chroot_dir}/${TARGET_FILE}.lz" out
259261
}
260262

261263
do_tar_gzip() {
@@ -268,8 +270,8 @@ do_tar_gzip() {
268270

269271
do_chroot_ae \
270272
"$chroot_dir" \
271-
"/gz-packer.sh ${chroot-dir}.tar.gz"
272-
$SUDO cp "${chroot_dir}/${chroot_dir}.tar.gz" out
273+
"/gz-packer.sh ${TARGET_FILE}.tar.gz"
274+
$SUDO cp "${chroot_dir}/${TARGET_FILE}.tar.gz" out
273275
}
274276

275277
do_tar_bzip() {
@@ -280,8 +282,8 @@ do_tar_bzip() {
280282
"chmod +x /j-packer.sh"
281283
do_chroot_ae \
282284
"$chroot_dir" \
283-
"/bin/bash /j-packer.sh ${chroot-dir}.tar.xz"
284-
$SUDO cp "${chroot_dir}/${chroot_dir}.tar.xz" out
285+
"/bin/bash /j-packer.sh ${TARGET_FILE}.tar.xz"
286+
$SUDO cp "${chroot_dir}/${TARGET_FILE}.tar.xz" out
285287
}
286288

287289
run_cmd() {

0 commit comments

Comments
 (0)