From f73d4178475e93a2c5798d49eeeedd456c7b9712 Mon Sep 17 00:00:00 2001 From: "Zheng, Qi" Date: Mon, 9 Aug 2021 15:45:54 +0800 Subject: [PATCH] Make it accordance for occlum package name and extracted dir name For example, in occlum_instance dir, do "occlum package occlum_test". After extracting the occlum_test.tar.gz, we will get "occlum_test" instead of "occlum_instance". Signed-off-by: Zheng, Qi --- tools/occlum | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/occlum b/tools/occlum index 8ab44563..e60e9052 100755 --- a/tools/occlum +++ b/tools/occlum @@ -440,7 +440,9 @@ cmd_package() { " fi - cd .. && tar -cvzf $instance_dir/$package_name $pkg_files $sim_files + cd .. && tar -cvzf $instance_dir/$package_name \ + --transform s/$instance_base_name/$(basename $package_name .tar.gz)/ \ + $pkg_files $sim_files echo "The package $package_name is generated successfully" }