Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyra-multistrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
imagebuild
pyra-multistrap
Commits
d2ba789e
Commit
d2ba789e
authored
Sep 26, 2019
by
Nick Elsmore
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hooks: Do not delete rootfs after compression
parent
7ed6da8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
pyra/hooks/completion_99_archive.sh
pyra/hooks/completion_99_archive.sh
+2
-15
No files found.
pyra/hooks/completion_99_archive.sh
View file @
d2ba789e
...
...
@@ -4,27 +4,14 @@
NOW
=
$(
date
+
"%Y-%m-%d_%H-%M"
)
cd
$1
mkdir
-p
../export
#FNAME=$(basename $1)-$NOW.tgz
FNAME
=
$(
basename
$1
)
echo
Creating
${
FNAME
}
.tgz
if
hash
pv 2>/dev/null
then
SIZE
=
$(
du
-sb
.
|
awk
'{print $1}'
)
tar
cf -
.
| pv
-s
$SIZE
|
gzip
--rsyncable
>
../export/
${
FNAME
}
.tgz
#tar cf - . | pv -s $SIZE > ../export/${FNAME}.tar
tar
cf -
.
| pv
-s
$SIZE
|
gzip
--rsyncable
>
../
${
FNAME
}
.tgz
else
tar
cf -
.
|
gzip
--rsyncable
>
../export/
${
FNAME
}
.tgz
#tar cf - . > ../export/${FNAME}.tgz
tar
cf -
.
|
gzip
--rsyncable
>
../
${
FNAME
}
.tgz
fi
#echo Creating ${FNAME}.tar.xz
#tar cf - . | pv -s $SIZE | xz --block-size=16M > ../export/${FNAME}.tar.xz
cd
../export/
#sha256sum ${FNAME}.tgz > ${FNAME}.tgz.sha256
#sha256sum ${FNAME}.tar.xz > ${FNAME}.tar.xz.sha256
#ln -sf ${FNAME} $(basename $1)-latest.tgz
rm
$1
-rf
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment