Hex Artifact Content

Artifact 8c722302168b99c2c1e9d1d07d4007d726309731:


0000: 23 21 20 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20  #! /usr/bin/env 
0010: 62 61 73 68 0a 0a 63 61 73 65 20 22 24 31 22 20  bash..case "$1" 
0020: 69 6e 0a 09 69 6e 76 61 6c 69 64 61 74 65 29 0a  in..invalidate).
0030: 09 09 73 74 61 74 65 6d 65 6e 74 3d 27 55 50 44  ..statement='UPD
0040: 41 54 45 20 73 69 74 65 73 20 53 45 54 20 74 74  ATE sites SET tt
0050: 6c 20 3d 20 22 30 22 3b 27 0a 09 09 3b 3b 0a 09  l = "0";'...;;..
0060: 63 6c 65 61 72 29 0a 09 09 72 6d 20 2d 72 66 20  clear)...rm -rf 
0070: 0a 09 09 73 74 61 74 65 6d 65 6e 74 3d 27 44 45  ...statement='DE
0080: 4c 45 54 45 20 46 52 4f 4d 20 73 69 74 65 73 3b  LETE FROM sites;
0090: 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 70 61 63   DELETE FROM pac
00a0: 6b 61 67 65 73 3b 20 44 45 4c 45 54 45 20 46 52  kages; DELETE FR
00b0: 4f 4d 20 66 69 6c 65 73 3b 27 0a 09 09 3b 3b 0a  OM files;'...;;.
00c0: 09 2a 29 0a 09 09 65 63 68 6f 20 22 55 73 61 67  .*)...echo "Usag
00d0: 65 3a 20 61 70 70 66 73 2d 63 61 63 68 65 20 7b  e: appfs-cache {
00e0: 69 6e 76 61 6c 69 64 61 74 65 7c 63 6c 65 61 72  invalidate|clear
00f0: 7d 22 20 3e 26 32 0a 0a 09 09 65 78 69 74 20 31  }" >&2....exit 1
0100: 0a 09 09 3b 3b 0a 65 73 61 63 0a 0a 65 78 65 63  ...;;.esac..exec
0110: 20 61 70 70 66 73 64 20 2d 73 71 6c 69 74 65 33   appfsd -sqlite3
0120: 20 22 24 7b 73 74 61 74 65 6d 65 6e 74 7d 22 0a   "${statement}".