Use bash features to improve $distfiles parsing.
That means that it's not necessary anymore to use an '@' before the extract suffix string. yay. --HG-- extra : convert_revision : 83ce2c783cb917ef59b87eacb0565cfcff277218
This commit is contained in:
parent
a4f4fde9cf
commit
ac80ddda40
221 changed files with 236 additions and 222 deletions
18
xbps.sh
18
xbps.sh
|
@ -368,9 +368,23 @@ extract_distfiles()
|
|||
fi
|
||||
|
||||
for f in ${distfiles}; do
|
||||
if [[ "$f" == *.tar.bz2 ]]; then
|
||||
cursufx=".tar.bz2"
|
||||
elif [[ "$f" == *.tbz ]]; then
|
||||
cursufx=".tbz"
|
||||
elif [[ "$f" == *.tar.gz ]]; then
|
||||
cursufx=".tar.gz"
|
||||
elif [[ "$f" == *.tgz ]]; then
|
||||
cursufx=".tgz"
|
||||
elif [[ "$f" == *.tar ]]; then
|
||||
cursufx=".tar"
|
||||
elif [[ "$f" == *.zip ]]; then
|
||||
cursufx=".zip"
|
||||
else
|
||||
msg_error "unknown distfile suffix"
|
||||
fi
|
||||
|
||||
curfile=$(basename $f)
|
||||
cursufx=${curfile##*@}
|
||||
curfile=$(basename $curfile|sed 's|@||g')
|
||||
|
||||
if [ $count -gt 1 ]; then
|
||||
lwrksrc="$wrksrc/${curfile%$cursufx}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue