-rwxr-xr-x | scripts/tothreaded | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/tothreaded b/scripts/tothreaded index f916ad8..bf6750e 100755 --- a/scripts/tothreaded +++ b/scripts/tothreaded | |||
@@ -1,35 +1,35 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | # PURPOSE : | 3 | # PURPOSE : |
4 | # | 4 | # |
5 | # this script converts a non-threaded control file to a threaded one | 5 | # this script converts a non-threaded control file to a threaded one |
6 | # by extending appropriate names with -mt as extension | 6 | # by extending appropriate names with -mt as extension |
7 | # | 7 | # |
8 | # eg abc.control becoms abc-mt.control | 8 | # eg abc.control becoms abc-mt.control |
9 | # | 9 | # |
10 | 10 | ||
11 | # | 11 | # |
12 | # make sure that the depends expression has enough spaces | 12 | # make sure that the depends expression has enough spaces |
13 | # expression can contian : , ( ) || && | 13 | # expression can contian : , ( ) || && |
14 | # | 14 | # |
15 | tokenize() { | 15 | tokenize() { |
16 | sed "s/,/ & /g" | sed "s/)/ & /g" | sed "s/(/ & /g" | sed "s/|/ & /g" | sed "s/&/ & /g" | 16 | sed "s/,/ & /g" | sed "s/)/ & /g" | sed "s/(/ & /g" | sed "s/|/ & /g" | sed "s/&/ & /g" |
17 | } | 17 | } |
18 | 18 | ||
19 | # | 19 | # |
20 | # function converts package name to threaded equivalend IF the | 20 | # function converts package name to threaded equivalend IF the |
21 | # package file HAS a threaded version | 21 | # package file HAS a threaded version |
22 | # | 22 | # |
23 | findthreadedequiv() { | 23 | findthreadedequiv() { |
24 | local isin i | 24 | local isin i |
25 | for i in $* | 25 | for i in $* |
26 | do | 26 | do |
27 | isin=`grep "^$i\$" "$ALLTHREADEDPKGSFILE"` | 27 | isin=`grep "^$i\$" "$ALLTHREADEDPKGSFILE"` |
28 | if [ -z "$isin" ] | 28 | if [ -z "$isin" ] |
29 | then | 29 | then |
30 | # no threaded package | 30 | # no threaded package |
31 | echo -n "$i" | 31 | echo -n "$i" |
32 | else | 32 | else |
33 | # threaded package | 33 | # threaded package |
34 | echo -n "${isin}-mt" | 34 | echo -n "${isin}-mt" |
35 | fi | 35 | fi |