File 0001-ldraw-mklist-generates-a-part-list-to-be-used-as-par.patch of Package ldraw-library

From 7119066246ba115c35b9a395baa581085ca2ca7e Mon Sep 17 00:00:00 2001
From: Jiri Bohac <jbohac@suse.cz>
Date: Wed, 9 Dec 2015 19:13:16 +0100
Subject: [PATCH 1/2] ldraw-mklist generates a part list to be used as
 parts.lst

---
 ldraw-mklist | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 ldraw-mklist

diff --git a/ldraw-mklist b/ldraw-mklist
new file mode 100755
index 0000000..2653566
--- /dev/null
+++ b/ldraw-mklist
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Run this script inside the ldraw "parts" directory to generate a part list
+# to be used as parts.lst
+
+for f in *.dat; do 
+	read zero desc < $f
+	[[ $zero == 0 ]] && [[ ${desc:0:9} != "~Moved to" ]] && 
+		printf '%-26s %-s\n' "$f" "$desc" 
+done | sed 's/[\t ]*\r$/\r/' | sort -n 
+
+
-- 
2.8.1
openSUSE Build Service is sponsored by