Changeset 74aea05


Ignore:
Timestamp:
01/29/14 08:24:55 (11 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
8f9a239
Parents:
bc9de12 (diff), 3eb788d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge pull request #19 from rbgarga/patch-3

Reduce tar verbosity

Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pbi-manager/pbi-manager

    rc4f3f7b r3eb788d  
    19811981add_pbi_repo() { 
    19821982        init_tmpdir 
    1983         tar xvf "${PBI_ADDREPO_FILE}" -C ${PBI_TMPDIR} >/dev/null 2>/dev/null 
     1983        tar xf "${PBI_ADDREPO_FILE}" -C ${PBI_TMPDIR} >/dev/null 2>/dev/null 
    19841984        if [ "$?" != "0" ] ; then 
    19851985                exit_err "Failed to read ${PBI_ADDREPO_FILE}" 
     
    20562056 
    20572057 
    2058         tar cvzf ${PBI_MKREPO_OUTDIR}/pbi-repo.rpo -C ${PBI_TMPDIR}/.mkrepo . >/dev/null 2>/dev/null 
     2058        tar czf ${PBI_MKREPO_OUTDIR}/pbi-repo.rpo -C ${PBI_TMPDIR}/.mkrepo . >/dev/null 2>/dev/null 
    20592059        echo "New PBI Repo created: ${PBI_MKREPO_OUTDIR}/pbi-repo.rpo" 
    20602060 
     
    27202720        if [ ! -e "${PBI_EXTRACTDIR}/PBI-newFiles.tar" ] ; then return; fi 
    27212721        echo "Installing new files..." 
    2722         tar xvf "${PBI_EXTRACTDIR}/PBI-newFiles.tar" -C "${PBI_PATCHWRKDIR}" >/dev/null 2>/dev/null  
     2722        tar xf "${PBI_EXTRACTDIR}/PBI-newFiles.tar" -C "${PBI_PATCHWRKDIR}" >/dev/null 2>/dev/null 
    27232723        if [ "$?" != "0" ] ; then 
    27242724                echo "Warning: Error during new file extraction, PBI may not function correctly." 
     
    30503050         
    30513051        # Extract the header files  
    3052         tar xvf "${PBI_FILENAME}" -C "${PBI_HEADER_TMPDIR}" >/dev/null 2>/dev/null 
     3052        tar xf "${PBI_FILENAME}" -C "${PBI_HEADER_TMPDIR}" >/dev/null 2>/dev/null 
    30533053        if [ "$?" != "0" ] ; then exit_err "Failed to read PBI header! Possible corrupt PBI, or wrong PBI version for this OS." ; fi 
    30543054 
     
    34683468        mkdir -p "${dir}" 
    34693469         
    3470         tar cvf - -C "${PBI_HEADER_TMPDIR}" . 2>/dev/null | tar xvf - -C "$dir" 2>/dev/null 
     3470        tar cf - -C "${PBI_HEADER_TMPDIR}" . 2>/dev/null | tar xvf - -C "$dir" 2>/dev/null 
    34713471 
    34723472        # If this was a patch, use the original path 
     
    36033603 
    36043604        echo "Extracting to: ${PBI_EXTRACTDIR}" 
    3605         tar="xvf -" 
    36063605 
    36073606        if [ "$PBI_VERBOSE" = "YES" ] ; then 
     3607                tar="xvf -" 
    36083608                echo "TOTALFILES: ${PBI_ARCHIVE_COUNT}" 
    3609                 tail +$PBI_SKIP_ARCHLINES "${PBI_FILENAME}" | tar ${tar} -C "${PBI_EXTRACTDIR}" 
    3610                 err="$?" 
    36113609        else 
    3612                 tail +$PBI_SKIP_ARCHLINES "${PBI_FILENAME}" | tar ${tar} -C "${PBI_EXTRACTDIR}" >/dev/null 2>/dev/null 
    3613                 err="$?" 
    3614         fi 
     3610                tar="xf -" 
     3611        fi 
     3612        tail +$PBI_SKIP_ARCHLINES "${PBI_FILENAME}" | tar ${tar} -C "${PBI_EXTRACTDIR}" 2>/dev/null 
     3613        err="$?" 
    36153614         
    36163615        if [ "$err" != "0" ] ; then exit_err "Failed extracting ${PBI_FILENAME}" ; fi 
     
    42584257                ln -s ${PBI_STAGEDIR}/local /usr/local 
    42594258        else 
    4260                 # Now copy the stagedir 
    4261                 tar cvf - ${_excOpts} --exclude .stagedir \ 
     4259                # Now copy the stagedir 
     4260                tar cf - ${_excOpts} --exclude .stagedir \ 
    42624261                --exclude .pkgdb --exclude .ld-elf.hints --exclude make.conf \ 
    42634262                --exclude make.conf.bak --exclude .keepports \ 
    42644263                -C "${cpDir}" . 2>/dev/null \ 
    4265                 | tar xvpf - -C ${PBI_STAGEDIR}/local 2>/dev/null 
     4264                | tar xpf - -C ${PBI_STAGEDIR}/local 2>/dev/null 
    42664265        fi 
    42674266 
     
    43174316        if [ -d "${PBI_CONFDIR}/${PBI_RESOURCE_DIR}" ] ; then 
    43184317                echo "Copying ${PBI_CONFDIR}/${PBI_RESOURCE_DIR} -> ${PBI_STAGEDIR}" 
    4319                 tar cvf - -C ${PBI_CONFDIR}/${PBI_RESOURCE_DIR} --exclude .svn . 2>/dev/null \ 
    4320                 | tar xvpf - -C ${PBI_STAGEDIR} 2>/dev/null 
     4318                tar cf - -C ${PBI_CONFDIR}/${PBI_RESOURCE_DIR} --exclude .svn . 2>/dev/null \ 
     4319                | tar xpf - -C ${PBI_STAGEDIR} 2>/dev/null 
    43214320        fi 
    43224321} 
     
    43254324test_tar_lzma() { 
    43264325        touch /tmp/.pbilzma.$$ >/dev/null 2>/dev/null 
    4327         tar cvJf /tmp/.pbilzma.tar.$$ /tmp/.pbilzma.$$ >/dev/null 2>/dev/null 
     4326        tar cJf /tmp/.pbilzma.tar.$$ /tmp/.pbilzma.$$ >/dev/null 2>/dev/null 
    43284327        _exitcode=$? 
    43294328        rm /tmp/.pbilzma.$$ >/dev/null 2>/dev/null 
     
    43484347        if test_tar_lzma ; then _tcmp="J" ; else _tcmp="j" ; fi 
    43494348        echo "Creating compressed archive..." 
    4350         tar cv${_tcmp}f "${PBI_CREATE_ARCHIVE}" ${_excOpts} -C ${PBI_STAGEDIRMNT} . 2>/dev/null  
     4349        tar c${_tcmp}f "${PBI_CREATE_ARCHIVE}" ${_excOpts} -C ${PBI_STAGEDIRMNT} . 2>/dev/null 
    43514350} 
    43524351 
     
    43544353mk_header_file() { 
    43554354        PBI_HEADER_ARCHIVE="${PBI_CREATE_OUTDIR}/.PBI-header.$$.tbz" 
    4356         tar cvjf ${PBI_HEADER_ARCHIVE} -C ${PBI_HEADERDIR} . >/dev/null 2>/dev/null 
     4355        tar cjf ${PBI_HEADER_ARCHIVE} -C ${PBI_HEADERDIR} . >/dev/null 2>/dev/null 
    43574356} 
    43584357 
     
    65316530        if [ -n "$_nFileList" ] ; then 
    65326531                echo "Saving new files archive..." 
    6533                 tar cvf "$_pbiPatchDir/PBI-newFiles.tar" \ 
     6532                tar cf "$_pbiPatchDir/PBI-newFiles.tar" \ 
    65346533                        -C "$_pbiNewDir/$_pbiNewPrefix" -T "$_nFileList" >/dev/null 2>/dev/null 
    65356534                rm "$_nFileList" 
     
    65506549        if test_tar_lzma ; then _tcmp="J" ; else _tcmp="j" ; fi 
    65516550        echo "Creating compressed archive..." 
    6552         tar cv${_tcmp}f "${_pbiPatchArchiveFile}" -C ${_pbiPatchDir} . 2>/dev/null  
     6551        tar c${_tcmp}f "${_pbiPatchArchiveFile}" -C ${_pbiPatchDir} . 2>/dev/null 
    65536552 
    65546553        # Make the header file 
     
    65746573 
    65756574        # Make the header tmpfile 
    6576         tar cvjf "${_pbiPatchHeaderFile}" -C ${_pbiPatchHeaderDir} . 2>/dev/null  
     6575        tar cjf "${_pbiPatchHeaderFile}" -C ${_pbiPatchHeaderDir} . 2>/dev/null 
    65776576        if [ "$?" != "0" ] ; then 
    65786577                echo "Warning: TAR returned error creating header archive!" 
     
    71097108                mkdir ${PBI_PROGDIRPATH}/linuxlib 
    71107109                echo "Copying /compat/linux -> ${PBI_STAGEDIRMNT}/linux" 
    7111                 tar cvf - -C /compat/linux . 2>/dev/null | \ 
    7112                 tar xvf - -C ${PBI_STAGEDIRMNT}/linux 2>/dev/null 
     7110                tar cf - -C /compat/linux . 2>/dev/null | \ 
     7111                tar xf - -C ${PBI_STAGEDIRMNT}/linux 2>/dev/null 
    71137112        fi 
    71147113} 
     
    71847183        else 
    71857184           echo "Creating chroot environment..." 
    7186            tar cvf - -C ${PBI_WORLDCHROOT} . | tar xvf - -C "${PBI_CHROOTDIR}" 2>/dev/null 
     7185           tar cf - -C ${PBI_WORLDCHROOT} . | tar xf - -C "${PBI_CHROOTDIR}" 2>/dev/null 
    71877186           [ $? -ne 0 ] && exit_err "Failed copying chroot environment!" 
    71887187        fi 
     
    72797278                mkdir -p "${PBI_CHROOTDIR}/pbimodule" 
    72807279                echo "Copying ${PBI_CONFDIR} -> ${PBI_CHROOTDIR}/pbimodule" 
    7281                 tar cvf - -C "${PBI_CONFDIR}" . 2>/dev/null | tar xvf - -C "${PBI_CHROOTDIR}/pbimodule" 2>/dev/null 
     7280                tar cf - -C "${PBI_CONFDIR}" . 2>/dev/null | tar xf - -C "${PBI_CHROOTDIR}/pbimodule" 2>/dev/null 
    72827281        fi 
    72837282 
     
    73697368          for i in $dFiles 
    73707369          do 
    7371             tar xvpf ${i} -C ${PBI_WORLDCHROOT} 2>/dev/null 
     7370            tar xpf ${i} -C ${PBI_WORLDCHROOT} 2>/dev/null 
    73727371            if [ $? -ne 0 ] ; then exit_err "Failed extracting freebsd environment"; fi 
    73737372            rm ${i} 
     
    75087507        echo "Copying FreeBSD sources to chroot environment" 
    75097508        mkdir -p ${PBI_BUILDTARGET}/usr/src >/dev/null 2>/dev/null 
    7510         tar cvf - -C "${PBI_BUILDSRC}" --exclude "\.svn/" . 2>/dev/null | tar xvf - -C "${PBI_BUILDTARGET}/usr/src" 2>/dev/null 
     7509        tar cf - -C "${PBI_BUILDSRC}" --exclude "\.svn/" . 2>/dev/null | tar xf - -C "${PBI_BUILDTARGET}/usr/src" 2>/dev/null 
    75117510        cd 
    75127511 
Note: See TracChangeset for help on using the changeset viewer.