Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
付燕斌
android-image-pack-tool
Commits
a5f4b04b
Commit
a5f4b04b
authored
Jan 15, 2024
by
zhouzhenyu
Browse files
zzy:upload function
parent
25222184
Changes
1
Show whitespace changes
Inline
Side-by-side
pack.sh
View file @
a5f4b04b
...
...
@@ -20,6 +20,10 @@ ORGCODE=""
CHANNELID
=
""
IMAGE_FILE
=
""
# new append
NOUPLOAD
=
"false"
LOCAL
=
"false"
export
PATH
=
${
PATH
}
:
$(
pwd
)
/tools/
PARSED_ARUGMENTS
=
$(
getopt
-a
-n
"
$0
"
-o
V:t:i:
--long
help
,vendor:,type:,image:,chroot-type:,orgcode:,channelid:,
--
"
$@
"
)
eval set
--
"
${
PARSED_ARUGMENTS
}
"
...
...
@@ -112,9 +116,43 @@ update_hugepall_zipfile() {
zip
-u
-j
"
$hugep_zip_file
"
"
$yaml_file
"
}
upload
()
{
# get current time
local
date_i
=
$(
date
+%Y-%m-%d-%s
)
echo
"
$date_i
"
echo
"line 34 end"
echo
"
$IMAGE_FILE
"
outfile
=
$(
basename
"
$IMAGE_FILE
"
)
echo
"
$outfile
"
MD5SUM
=
$(
md5sum
${
outfile
}
|
awk
'{print $1}'
)
if
[[
"
$NOUPLOAD
"
!=
"true"
]]
then
7z a
-mm
=
LZMA2
$outfile
.7z
$outfile
old_outfile
=
$outfile
rm
-f
$old_outfile
outfile
=
$outfile
.7z
# upload to dir
upload.sh
$args
--file
${
outfile
}
--directory
product/terminal/chroot_androidrom/
${
ORGCODE
}
/
${
date_i
}
# construct URL
IMG_URL
=
"https://cdn.linkfog.cn/""product/terminal/chroot_androidrom/
${
ORGCODE
}
/
${
date_i
}
"
# title
TITLE
=
"???Armbian ???,VENDOR:
${
VENDOR
}
,ORGCODE:
${
ORGCODE
}
${
date
}
"
mail.sh
${
VENDOR
}
${
IMG_URL
}
${
MD5SUM
}
${
TITLE
}
2>/dev/null
echo
"RESULT:
${
VENDOR
}
${
IMG_URL
}
${
MD5SUM
}
${
TITLE
}
"
# delete .img file
rm
-f
${
outfile
}
fi
}
export
PATH
=
"
$PATH
"
:
"
$(
pwd
)
"
/tools/
generate_vendor_confg
update_hugepall_zipfile
build_image
"
$IMAGE_FILE
"
upload
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