Skip to content

Commit 21ebcc0

Browse files
fix permission error while cp
1 parent 8c96b02 commit 21ebcc0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

plugins/functions

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ do_compress() {
246246

247247
do_tar_lz4() {
248248
shout "starting compression..."
249-
cp "plugins/lz-packer.sh" "${chroot_dir}"
249+
$SUDO cp "plugins/lz-packer.sh" "${chroot_dir}"
250250

251251
do_chroot_ae \
252252
"$chroot_dir" \
@@ -255,12 +255,12 @@ do_tar_lz4() {
255255
do_chroot_ae \
256256
"$chroot_dir" \
257257
"/gz-packer.sh ${chroot-dir}.lz"
258-
cp "${chroot_dir}/${chroot_dir}.lz" out
258+
$SUDO cp "${chroot_dir}/${chroot_dir}.lz" out
259259
}
260260

261261
do_tar_gzip() {
262262
shout "starting compression..."
263-
cp "plugins/gz-packer.sh" "${chroot_dir}"
263+
$SUDO cp "plugins/gz-packer.sh" "${chroot_dir}"
264264

265265
do_chroot_ae \
266266
"$chroot_dir" \
@@ -269,19 +269,19 @@ do_tar_gzip() {
269269
do_chroot_ae \
270270
"$chroot_dir" \
271271
"/gz-packer.sh ${chroot-dir}.tar.gz"
272-
cp "${chroot_dir}/${chroot_dir}.tar.gz" out
272+
$SUDO cp "${chroot_dir}/${chroot_dir}.tar.gz" out
273273
}
274274

275275
do_tar_bzip() {
276276
shout "starting compression..."
277-
cp "plugins/j-packer.sh" "${chroot_dir}"
277+
$SUDO cp "plugins/j-packer.sh" "${chroot_dir}"
278278
do_chroot_ae \
279279
"$chroot_dir" \
280280
"chmod +x /j-packer.sh"
281281
do_chroot_ae \
282282
"$chroot_dir" \
283283
"/bin/bash /j-packer.sh ${chroot-dir}.tar.xz"
284-
cp "${chroot_dir}/${chroot_dir}.tar.xz" out
284+
$SUDO cp "${chroot_dir}/${chroot_dir}.tar.xz" out
285285
}
286286

287287
run_cmd() {

0 commit comments

Comments
 (0)