OSDN Git Service

initial
[charactermanaj/CharacterManaJStorage.git] / dbupdate.sh
1 #!/bin/bash
2 DBFILE=cgi-bin/mydb.db
3 (printf ".open ${DBFILE}\n"
4 echo 'ls -1 zip' | sftp -q seraphy@storage.osdn.net:/storage/groups/c/ch/charactermanaj | grep -v "^sftp>" | while read line
5 do
6    printf "update zip_entries set href='https://osdn.net/projects/charactermanaj/storage/${line}' where fname='${line#zip/}';\n" 
7 done;
8 ) | sqlite3