~klnavarro98/spip-statique/master

« back to all changes in this revision

Viewing changes to spip_statique.sh

  • Committer: BoOz
  • Date: 2017-05-29 20:09:56 UTC
  • Revision ID: git-v1:d1cfff5a89ddd5d0e74af323563f873aacf3567e
ne pas effacer tous les numeros, juste ceux à la fin (Marcimat)

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
# nettoyer un peu
53
53
# virer les hash. jquery.colorbox.js?1494445576 -> jquery.colorbox.js
54
 
find . -type f -regex ".*?[0-9]*" | while read f ; do
55
 
        fichier_propre=$(echo $f | sed -e 's/[0-9]//g' -e 's/?//g')
 
54
# local/cache-vignettes/L400xH282/ChampsExtras2-3ce9f.png?1484461418 
 
55
find . -type f -regex ".*?[0-9][0-9]*$" | while read f ; do
 
56
        fichier_propre=$(echo $f | sed -e 's/[0-9][0-9]*$//g' -e 's/?//g')
56
57
        mv "$f" "$fichier_propre"
57
58
        emplacement_actuel=$(echo ${f/$racine\//} | sed -e 's:\./::g')
58
59
        nouvel_emplacement=$(echo ${fichier_propre/$racine\//} | sed -e 's:\./::g')