Package: etktab / 3.2-5

fileconvert.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Description: File conversion tool fileconvert to upgrade from old file format
 This patch includes the tool fileconvert (including manpage) that helps on
 upgrading to new file format.
Author: Roland Stigge <stigge@antcom.de>

--- /dev/null
+++ etktab-3.2/fileconvert-v1-to-v2.1
@@ -0,0 +1,15 @@
+.TH "fileconvert-v1-to-v2" "1" "3.1" "" ""
+.SH "NAME"
+.LP 
+fileconvert\-v1\-to\-v2 \- Converts eTktab saved files from v1 to v2
+.SH "SYNTAX"
+.LP 
+fileconvert\-v1\-to\-v2 <\fIfilename\fP>
+.SH "DESCRIPTION"
+.LP 
+This program is used to convert saved files from eTktab v1 to the newer v2 format
+.SH "AUTHORS"
+fileconvert-v1-to-v2 was written by Jason Sonnenschein <jes_jm@yahoo.com>. This manpage was written by Hereward Cooper <zadok@phreaker.net> for the Debian Project (but can be used freely elsewhere).
+.SH "SEE ALSO"
+.LP 
+eTktab(1)
--- /dev/null
+++ etktab-3.2/fileconvert-v1-to-v2
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+case "$1" in 
+    "" | -* )
+    echo "Usage:  $0 <filename> [...]"
+    exit
+    ;;
+esac
+for i in $* ; do
+    if [ -f $i ] ; then
+        newname=`echo $i | sed 's/etk$/et6.gz/' | sed 's/etb$/et4.gz/'`
+        mv $i $newname
+        gzip -d $newname
+    else
+        echo "No such file \"$i\""
+    fi
+done