Skip to content
Snippets Groups Projects
Commit 8ef7b889 authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

agent: Add "agent-files" generation

parent 563443c5
No related branches found
No related tags found
1 merge request!14Add Uninstall and Version Options
......@@ -86,7 +86,7 @@ parse_options() {
output=
version=
input=
bootstrap="bootstrap/bootstrap-install"
bootstrap="bootstrap/install"
# parse command line options into the global variables above
parse_options "$@"
......@@ -111,7 +111,15 @@ mkdir -p $tempdir/data
tempfile=$(mktemp /tmp/datasid.XXXXXXXX)
tar --directory "$tempdir" -czf "$tempfile" .
rm -rf "$tempdir"
if test $bootstrap = "bootstrap/install"; then
mkdir -p "$(dirname $0)/agent-files/"
cp "$(dirname $0)/$bootstrap" "$(dirname $0)/agent-files/"
mv $tempdir "$(dirname $0)/agent-files/"
rm -rf "$(dirname $0)/agent-files/datasid"
mv "$(dirname $0)/agent-files/$(basename $tempdir)" "$(dirname $0)/agent-files/datasid"
else
rm -rf $tempdir
fi
pkgmd5=$(md5sum "$tempfile" | cut -d' ' -f1)
pkgline=$(( $(wc -l "$bootstrap" | cut -d' ' -f1) + 1 ))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment