Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
bdfa2530
Commit
bdfa2530
authored
Sep 26, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cd from shell scrips
parent
93e847fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
Rakefile
Rakefile
+2
-1
copy_resources_script.rb
lib/cocoapods/generator/copy_resources_script.rb
+2
-8
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+3
-3
No files found.
Rakefile
View file @
bdfa2530
...
@@ -178,7 +178,8 @@ begin
...
@@ -178,7 +178,8 @@ begin
task
:rebuild
=>
:check_for_pending_changes
do
task
:rebuild
=>
:check_for_pending_changes
do
tarballs
.
each
do
|
tarball
|
tarballs
.
each
do
|
tarball
|
basename
=
File
.
basename
(
tarball
)
basename
=
File
.
basename
(
tarball
)
sh
"cd
#{
File
.
dirname
(
tarball
)
}
&& rm
#{
basename
}
&& env COPYFILE_DISABLE=1 tar -zcf
#{
basename
}
#{
basename
[
0
..-
8
]
}
"
untarred_path
=
File
.
join
(
File
.
dirname
(
tarball
),
basename
[
0
..-
8
])
sh
"rm
#{
tarball
}
&& env COPYFILE_DISABLE=1 tar -zcf
#{
tarball
}
#{
untarred_path
}
"
end
end
end
end
...
...
lib/cocoapods/generator/copy_resources_script.rb
View file @
bdfa2530
...
@@ -119,12 +119,6 @@ case "${TARGETED_DEVICE_FAMILY}" in
...
@@ -119,12 +119,6 @@ case "${TARGETED_DEVICE_FAMILY}" in
;;
;;
esac
esac
realpath() {
DIRECTORY="$(cd "${1%/*}" && pwd)"
FILENAME="${1##*/}"
echo "$DIRECTORY/$FILENAME"
}
install_resource()
install_resource()
{
{
if [[ "$1" = /* ]] ; then
if [[ "$1" = /* ]] ; then
...
@@ -166,7 +160,7 @@ EOM
...
@@ -166,7 +160,7 @@ EOM
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
;;
*.xcassets)
*.xcassets)
ABSOLUTE_XCASSET_FILE=
$(realpath "$RESOURCE_PATH")
ABSOLUTE_XCASSET_FILE=
"$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
;;
*)
*)
...
@@ -195,7 +189,7 @@ then
...
@@ -195,7 +189,7 @@ then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
while read line; do
while read line; do
if [[ $line != "
`realpath $PODS_ROOT`
*" ]]; then
if [[ $line != "
${PODS_ROOT}
*" ]]; then
XCASSET_FILES+=("$line")
XCASSET_FILES+=("$line")
fi
fi
done <<<"$OTHER_XCASSETS"
done <<<"$OTHER_XCASSETS"
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
bdfa2530
...
@@ -241,9 +241,9 @@ module Pod
...
@@ -241,9 +241,9 @@ module Pod
build_phase
=
native_target
.
new_shell_script_build_phase
(
'Create Symlinks to Header Folders'
)
build_phase
=
native_target
.
new_shell_script_build_phase
(
'Create Symlinks to Header Folders'
)
build_phase
.
shell_script
=
<<-
eos
.
strip_heredoc
build_phase
.
shell_script
=
<<-
eos
.
strip_heredoc
cd
"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME"
local base=
"$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME"
ln -fs $
{PUBLIC_HEADERS_FOLDER_PATH
\#
$WRAPPER_NAME/}
${PUBLIC_HEADERS_FOLDER_PATH
\#\$
CONTENTS_FOLDER_PATH/}
ln -fs $
base/${PUBLIC_HEADERS_FOLDER_PATH
\#
$WRAPPER_NAME/} $base/
${PUBLIC_HEADERS_FOLDER_PATH
\#\$
CONTENTS_FOLDER_PATH/}
ln -fs $
{PRIVATE_HEADERS_FOLDER_PATH
\#\$
WRAPPER_NAME/}
${PRIVATE_HEADERS_FOLDER_PATH
\#\$
CONTENTS_FOLDER_PATH/}
ln -fs $
base/${PRIVATE_HEADERS_FOLDER_PATH
\#\$
WRAPPER_NAME/} $base/
${PRIVATE_HEADERS_FOLDER_PATH
\#\$
CONTENTS_FOLDER_PATH/}
eos
eos
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment