From f9b569052bee1a3a6efe11fc04fc91c9373a6e3c Mon Sep 17 00:00:00 2001
From: Sebastien Luttringer <sebastien.luttringer@smartjog.com>
Date: Thu, 16 Feb 2012 16:53:16 +0100
Subject: [PATCH] move smartjog tools in anothers repository

---
 tools/clean-staging | 37 -------------------------------------
 tools/clean-testing | 34 ----------------------------------
 tools/new-image     | 40 ----------------------------------------
 tools/staging       | 29 -----------------------------
 4 files changed, 140 deletions(-)
 delete mode 100755 tools/clean-staging
 delete mode 100755 tools/clean-testing
 delete mode 100755 tools/new-image
 delete mode 100755 tools/staging

diff --git a/tools/clean-staging b/tools/clean-staging
deleted file mode 100755
index 8b3b20c..0000000
--- a/tools/clean-staging
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import json
-from subprocess import Popen, PIPE, check_call
-from installsystems.printer import arrow
-
-def get_image_list(repo):
-	p = Popen(['is', '--no-color', '--quiet', '--repo-search', '',
-		'list', '-j', '%s/*' % repo], stdout=PIPE)
-	stdout, stderr = p.communicate()
-	if p.returncode != 0:
-		exit('Unable to get %s list' % repo)
-	img = json.loads(stdout)
-	d = {}
-	for k,v in img.items():
-		d[v['md5']] = k
-	return d
-
-
-arrow('Getting staging images list')
-staging_imgs=get_image_list('staging')
-arrow('Getting stable images list')
-stable_imgs=get_image_list('stable')
-arrow('Getting testing images list')
-testing_imgs=get_image_list('testing')
-
-official=set(stable_imgs) | set(testing_imgs)
-to_remove=set(staging_imgs) & official
-
-arrow('Removing staging images in stable or testing')
-for md5 in to_remove:
-	name=staging_imgs[md5]
-	arrow('%s (%s)' % (name, md5), 1)
-	check_call(['is', 'del', '-f', name])
-
-# vim:set ts=2 sw=2 ft=python noet:
diff --git a/tools/clean-testing b/tools/clean-testing
deleted file mode 100755
index 046c8ed..0000000
--- a/tools/clean-testing
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import json
-from subprocess import Popen, PIPE, check_call
-from installsystems.printer import arrow
-
-def get_image_list(repo):
-	p = Popen(['is', '--no-color', '-q', 'list', '-j', '%s/*' % repo], stdout=PIPE)
-	stdout, stderr = p.communicate()
-	if p.returncode != 0:
-		exit('Unable to get %s list' % repo)
-	img = json.loads(stdout)
-	d = {}
-	for k,v in img.items():
-		d[v['md5']] = k
-	return d
-
-
-arrow('Getting stable images list')
-stable_imgs=get_image_list('stable')
-arrow('Getting testing images list')
-testing_imgs=get_image_list('testing')
-
-official=set(stable_imgs)
-to_remove=set(testing_imgs) & official
-
-arrow('Removing testing images in stable')
-for md5 in to_remove:
-	name=testing_imgs[md5]
-	arrow('%s (%s)' % (name, md5), 1)
-	check_call(['is', 'del', '-f', name])
-
-# vim:set ts=2 sw=2 ft=python noet:
diff --git a/tools/new-image b/tools/new-image
deleted file mode 100755
index 7cf0060..0000000
--- a/tools/new-image
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-# A seblu script
-
-usage() {
-  echo "usage: ${0##*/} image_name" >&2
-  exit 1
-}
-
-image_path='/root/images'
-image_name="$1"
-
-cd "$image_path"
-
-# check image already exists
-[[ -d "$image_name" ]] && echo "Image $image_name already exists" >&2 && exit 2
-
-# create image
-is new "$image_name"
-
-cd "$image_name"
-
-# customize description
-sed -ri "s/\s*name\s*=.*/name = $image_name/" description
-sed -ri "s/\s*version\s*=.*/version = 0/" description
-
-# create git
-git init
-
-# add gitignore
-cat > .gitignore << EOF
-*.isimage
-*.isdata
-payload
-EOF
-
-git add .gitignore
-git add description changelog
-git ci -m 'Initial commit'
-
-# vim:set ts=2 sw=2 ft=sh et:
diff --git a/tools/staging b/tools/staging
deleted file mode 100755
index 8797681..0000000
--- a/tools/staging
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-usage() {
-	echo "usage: $0 [build_options]" >&2
-}
-
-repo=$(basename $0)
-(( $# > 0 )) && build_options=("$@") || build_options=('-f')
-
-[[ ! -r description ]] && echo 'Invalid source image' >&2 && usage && exit 2
-
-imgname=$(sed -rn  's/^[[:space:]]*name[[:space:]]*=[[:space:]]*([^[:space:]]+)[[:space:]]*/\1/p' description)
-imgver=$(sed -rn  's/^[[:space:]]*version[[:space:]]*=[[:space:]]*([^[:space:]]+)[[:space:]]*/\1/p' description)
-
-echo "Building image $imgname v$imgver and pushing it on repo $repo"
-
-# build new version
-is build "${build_options[@]}" || exit 1
-
-# is v5 doesn't return != 0 if ctrl+c is pressed, we check manually
-[[ -f "$imgname-$imgver.isimage" ]] || exit 1
-
-# delete old version
-is del -fp "$repo/$imgname:$imgver"
-
-# add new version
-is add "$repo" "$imgname-$imgver.isimage"
-
-# vim:set ts=2 sw=2 ft=sh noet:
-- 
GitLab