blob: b396261d69c0c680b94dd966496d25d335d9762d (
plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
--- a/icecc-create-env 2006-12-14 09:50:46.000000000 +0300
+++ b/icecc-create-env 2011-08-31 17:52:45.000000000 +0400
@@ -27,9 +27,6 @@
# readlink is not portable enough.
path=`ls -H $path`
toadd="$name=$path"
- if test "$name" = "$path"; then
- toadd=$path
- fi
is_contained "$toadd" && return
if test -z "$silent"; then
echo "adding file $toadd"
@@ -117,6 +114,14 @@
add_file "$specfile"
fi
+ltofile=`$added_gcc -print-prog-name=lto1`
+pluginfile="${ltofile%lto1}liblto_plugin.so"
+if test -r "$pluginfile"
+then
+ add_file $pluginfile ${pluginfile#*usr}
+ add_file $pluginfile /usr${pluginfile#*usr}
+fi
+
tempdir=`mktemp -d /tmp/iceccenvXXXXXX`
new_target_files=
for i in $target_files; do
@@ -140,49 +147,44 @@
done
#sort the files
- target_files=`for i in $new_target_files; do echo $i; done | sort`
+target_files=`for i in $new_target_files; do echo $i; done | sort`
#test if an archive name was supplied
#if not use the md5 of all files as the archive name
if test -z "$archive_name"; then
-md5sum=NONE
-for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
- if test -x $file; then
- md5sum=$file
- break
- fi
-done
+ md5sum=NONE
+ for file in /usr/bin/md5sum /bin/md5 /usr/bin/md5; do
+ if test -x $file; then
+ md5sum=$file
+ break
+ fi
+ done
-#calculate md5 and use it as the archive name
-archive_name=`for i in $target_files; do $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'` || {
- if test -z "$silent"; then
- echo "Couldn't compute MD5 sum."
+ #calculate md5 and use it as the archive name
+ archive_name=`for i in $target_files; do test -f $tempdir/$i && $md5sum $tempdir/$i; done | sed -e 's/ .*$//' | $md5sum | sed -e 's/ .*$//'`.tar.gz || {
+ if test -z "$silent"; then
+ echo "Couldn't compute MD5 sum."
+ fi
+ exit 2
+ }
+ mydir=`pwd`
+else
+ mydir="`dirname "$archive_name"`"
+
+ #check if we have a full path or only a filename
+ if test "$mydir" = "." ; then
+ mydir=`pwd`
+ else
+ mydir=""
fi
- exit 2
-}
-
fi
if test -z "$silent"; then
-echo "creating $archive_name.tar.gz"
+echo "creating $archive_name"
fi
-if test -z "$archive_name"; then
- mydir=`pwd`
-else
-# mydir=dirname ${archive_name}
- mydir=${archive_name%/*}
-
-#check if we have a full path or only a filename
- if test -z "$mydir"; then
- mydir=`pwd`
- else
- mydir=""
- fi
-
-fi
cd $tempdir
-tar -czhf "$mydir/$archive_name".tar.gz $target_files || {
+tar -czhf "$mydir/$archive_name" $target_files || {
if test -z "$silent"; then
echo "Couldn't create archive"
fi
|