From 217413b46e25c5efa23d6e83ec0e6a45286fda7a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 29 Dec 2012 12:28:44 +0100 Subject: [PATCH] Gallery2: More complete gal-mj-upload --- gal2/bin/gal-mj-upload | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gal2/bin/gal-mj-upload b/gal2/bin/gal-mj-upload index b92c3c2..1052596 100755 --- a/gal2/bin/gal-mj-upload +++ b/gal2/bin/gal-mj-upload @@ -3,6 +3,10 @@ use strict; use warnings; +print "## Updating Git\n"; +system "git", "pull"; +die if $?; + print "## Ensuring that photos are generated\n"; system "gal", "gen"; die if $?; @@ -17,8 +21,18 @@ print "## Uploading album $album\n"; system "rs", "$static/", "jw:www/static/gallery/photo/$album/"; die if $?; +print "## Calling editor on index files\n"; +system 'vim', "$root/photos/Makefile", "$root/photos/index.thtml"; +die if $?; + +print "## Committing to repository\n"; +system 'git', 'add', 'gallery.cf', 'gallery.list'; die if #?; +system 'git', 'add', "$root/photos/Makefile", "$root/photos/index.thtml"; die if $?; +system 'git', 'commit'; die if $?; +system 'git', 'push'; die if $?; + print "## Pulling at the server\n"; -system "ssh", "jw", "cd web && git pull"; +system "ssh", "jw", "cd web && git pull && make"; die if $?; print "## Regenerating cache at the server\n"; -- 2.39.2