Changeset 2968 for lliurex-up


Ignore:
Timestamp:
Nov 30, 2016, 6:34:46 PM (3 years ago)
Author:
kbut
Message:

add scripts for pool

Location:
lliurex-up/trunk/fuentes
Files:
7 added
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-up/trunk/fuentes/LliurexUpForPool.sh

    r2932 r2968  
    11#!/bin/bash
    22POOLPATH=$1
    3 CHANGELOGSFOLDER="changelogs"
    4 DEBSPATH="${POOLPATH}/pool"
     3CHANGELOGSFOLDER="changelogs" 
     4DEBSPATH="${POOLPATH}/pool" # /srv/mirror/prueba-changelog/pool
    55TEMPFOLDERDEB=$(mktemp)
    6 UNCOMPRESSEDDEB="${TEMPFOLDERDEB}/deb/"
    7 for x in $(find $DEBSPATH -type f); do
    8         FOLDERDEB=$(echo $x | sed -E -e "s/_all.deb$|_i386.deb$|_amd64.deb$//g")
    9         if [ ! -e "${POOLPATH}/${CHANGELOGSFOLDER}" ] ; then
    10                 ###############################################
    11                 #   Falta un if para comprobar que es un DEB  #
    12                 ##############################################
     6UNCOMPRESSEDDEB="${TEMPFOLDERDEB}/deb/" #/tmp/temp654/deb
     7for x in $(find $DEBSPATH -type f -printf "%P\n"); do #
     8        rc=0
     9        echo "$x" | grep -E -q "\.(u)?deb$" || rc=1; echo $rc
     10        if [ "$rc" != "0"]; then
     11                continue
     12        fi
     13        FOLDERDEB=$(echo $x | sed -E -e "s/_all.(u)?deb$|_i386.(u)?deb$|_amd64.(u)?deb$//g")
     14        if [ ! -e "${POOLPATH}/${CHANGELOGSFOLDER}/${FOLDERDEB}" ] ; then
    1315                mkdir "${UNCOMPRESSEDDEB}"
    14                 dpkg -x "${x}" "${UNCOMPRESSEDDEB}"
     16                dpkg -x "${DEBSPATH}/${x}" "${UNCOMPRESSEDDEB}"
    1517                CHANGELOGFILE=$(find ${UNCOMPRESSEDDEB} -name changelog.gz)
    1618                if [ -e ${CHANGELOGSFOLDER} ]; then
    17                         AUX="${POOLPATH}/${CHANGELOGSFOLDER}/"
     19                        AUX="${POOLPATH}/${CHANGELOGSFOLDER}/${FOLDERDEB}"
    1820                        mkdir -p "${AUX}"
    1921                        gunzip "${CHANGELOGFILE}"
Note: See TracChangeset for help on using the changeset viewer.