File: clean_camo_cache.sh

package info (click to toggle)
3270font 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,424 kB
  • sloc: python: 184; makefile: 140; sh: 81; xml: 21
file content (16 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# Gets the current branch README, selects the camo cache images and
# purges the cache so that new versions of the images can be seen.

curl -s https://github.com/rbanffy/3270font/blob/\
"$(git rev-parse --abbrev-ref HEAD)"\
/README.md \
    | grep -F 'camo.githubusercontent.com/' \
    | sed 's/\(.*href="\)//' \
    | sed 's/\(">.*\)//' \
    | while read -r i
do
    echo Cleaning $i
    curl -X PURGE "$i"
done