[Pkg-debile-commits] [debile-slave] 05/100: meh

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:52:58 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch master
in repository debile-slave.

commit 23a633af74ccd5c0c158421be8538e24a96fb619
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Wed May 22 13:20:58 2013 -0400

    meh
---
 bin/schroot-abort-repack |   27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/bin/schroot-abort-repack b/bin/schroot-abort-repack
index 40cd1fe..75e5fd0 100755
--- a/bin/schroot-abort-repack
+++ b/bin/schroot-abort-repack
@@ -1,18 +1,17 @@
-#!/usr/bin/env python3
-import configparser
-import sys
+#!/bin/bash
 
-if len(sys.argv) <= 1:
-    print("need a session id")
-    sys.exit(1)
+CHROOT=$1
 
-session = sys.argv[1]
+if [ "x${CHROOT}" = "x" ]; then
+    echo "Need a session"
+    exit 1
+fi
 
-cfg = configparser.ConfigParser()
-path = "/var/lib/schroot/session/%s" % (session)
-if cfg.read(path) == []:
-    print("Need a valid session")
-    sys.exit(2)
+FPATH=/var/lib/schroot/session/${CHROOT}
 
-cfg[session]['file-repack'] = 'false'
-cfg.write(open(path, 'w'))
+if [ ! -e ${FPATH} ]; then
+    echo "No such session"
+    exit 2
+fi
+
+sed 's/file-repack=true/file-repack=false/g' -i ${FPATH}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git



More information about the Pkg-debile-commits mailing list