macosx-create-bundle (659ed23b) macosx-create-bundle (c8ec31d6)
1#!/bin/sh
2#**************************************************************
3#
4# Licensed to the Apache Software Foundation (ASF) under one
5# or more contributor license agreements. See the NOTICE file
6# distributed with this work for additional information
7# regarding copyright ownership. The ASF licenses this file
8# to you under the Apache License, Version 2.0 (the

--- 60 unchanged lines hidden (view full) ---

69
70 solverbindir="$SOLARVERSION/$INPATH/bin"
71 localbindir="../../.."
72
73 # Determine file type
74 filetype=`file -L "$inputfile"`
75
76 # Create bundle based on file type
1#!/bin/sh
2#**************************************************************
3#
4# Licensed to the Apache Software Foundation (ASF) under one
5# or more contributor license agreements. See the NOTICE file
6# distributed with this work for additional information
7# regarding copyright ownership. The ASF licenses this file
8# to you under the Apache License, Version 2.0 (the

--- 60 unchanged lines hidden (view full) ---

69
70 solverbindir="$SOLARVERSION/$INPATH/bin"
71 localbindir="../../.."
72
73 # Determine file type
74 filetype=`file -L "$inputfile"`
75
76 # Create bundle based on file type
77 if printf "$filetype" | grep -q 'Mach-O .* executable'; then
77 if printf "$filetype" | grep -q 'Mach-O.* executable'; then
78
79 # Do nothing as this step is obsolete
80 :
81
78
79 # Do nothing as this step is obsolete
80 :
81
82 elif printf "$filetype" | grep -q 'Mach-O .* dynamically linked shared library'; then
82 elif printf "$filetype" | grep -q 'Mach-O.* dynamically linked shared library'; then
83 # Screen out lib\w+static libraries as they are not used directly
84 if ! printf "$inputfilename" | grep -q -x -E 'lib\w+static.*\.dylib'; then
85 # Create jnilib link
86 inputjnilibname="`basename $inputfilename .dylib`.jnilib"
87 if [ ! -L "$outputdir/$inputjnilibname" ]; then
88 rm -Rf "$outputdir/$inputjnilibname"
89 fi
90 # Link jnilib
91 ln -sf "$inputfilename" "$outputdir/$inputjnilibname"
92
93 #printf "macosx-create-bundle: $outputdir/$inputjnilibname successfully created\n"
94 fi
95 else
96 printf "macosx-create-bundle: error: \"$inputfile\" is not an executable or shared library.\n" >&2
97 exit 1
98 fi
99done
83 # Screen out lib\w+static libraries as they are not used directly
84 if ! printf "$inputfilename" | grep -q -x -E 'lib\w+static.*\.dylib'; then
85 # Create jnilib link
86 inputjnilibname="`basename $inputfilename .dylib`.jnilib"
87 if [ ! -L "$outputdir/$inputjnilibname" ]; then
88 rm -Rf "$outputdir/$inputjnilibname"
89 fi
90 # Link jnilib
91 ln -sf "$inputfilename" "$outputdir/$inputjnilibname"
92
93 #printf "macosx-create-bundle: $outputdir/$inputjnilibname successfully created\n"
94 fi
95 else
96 printf "macosx-create-bundle: error: \"$inputfile\" is not an executable or shared library.\n" >&2
97 exit 1
98 fi
99done