I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
site-updater.sh 487 B
Newer Older
  • Learn to ignore specific revisions
  • str4d's avatar
    str4d committed
    #!/bin/sh
    
    kytv's avatar
    kytv committed
    TMP=$(mktemp XXXXXXXXXX)
    trap 'rm -f $TMP;exit' 0 1 2 15
    
    str4d's avatar
    str4d committed
    
    
    kytv's avatar
    kytv committed
    mtn pull
    mtn up 2>&1 | tee $TMP
    
    str4d's avatar
    str4d committed
    
    
    kytv's avatar
    kytv committed
    
    if grep "^mtn: \(add\|patch\|dropp\|updat\)\(ed\|ing\) 'i2p2www/translations/" "$TMP" >/dev/null ; then
    
    str4d's avatar
    str4d committed
      echo "Translations updated, compiling messages"
      ./compile-messages.sh
    fi
    
    
    kytv's avatar
    kytv committed
    if grep "^mtn: updating 'i2p2www/.*\.py\|^mtn: updating 'i2p2www/.*/.*\.py" "$TMP" >/dev/null ; then
    
    str4d's avatar
    str4d committed
      echo "Python files changed, restarting server"
    
    dev's avatar
    dev committed
      touch /tmp/2fcd2f17-c293-4f77-b4c9-9b266ba70daa
    
    str4d's avatar
    str4d committed
    fi