We encountered the following problems during package packaging using Linux shell scripts:
Tar: removing leading '/' from Member names
Shell Content
#! /Bin/sh
Pkg_dir =$ {PWD}/release
Pkg_name1_release.tar.gz
Tar-zvcf $ {pkg_name }$ {pkg_dir}
If you execute this scripts in the upper-level directory of the release, the following error occurs: Tar: removing leading '/' from Member names
Take a closer look,No better solution found. Google on the Internet basically uses tar.-PParameter, but the absolute path is introduced in [unknown end user] during decompression. Therefore, the problem cannot be solved.
Use the followingWorkaround
Because the tar operation is performed in the upper-level directory of release, you can directly Delete $ {PWD} In pkg_dir =$ {PWD}/release and use pkg_dir = release.
[P.s] if you have any experts to solve this problem, please kindly advise!