Commit d4e32b7b authored by Ben Asher's avatar Ben Asher Committed by GitHub

Merge pull request #5959 from benasher44/basher_remove_cd

Remove uses of shell cd
parents 93e847fd 7e2ecc1a
......@@ -11,7 +11,7 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
* Cache result of inhibit_warnings and include_in_build_config to speed up pod install.
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#5934](https://github.com/CocoaPods/CocoaPods/pull/5934)
* Improve performance of PathList.read_file_system
[Heath Borders](https://github.com/hborders)
[#5890](https://github.com/CocoaPods/CocoaPods/issues/5890)
......@@ -20,6 +20,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#5837](https://github.com/CocoaPods/CocoaPods/pull/5837)
* Remove uses of `cd` in generated scripts
[Ben Asher](https://github.com/benasher44)
[#5959](https://github.com/CocoaPods/CocoaPods/pull/5959)
##### Bug Fixes
* Remove special handling for messages apps
......
......@@ -178,7 +178,8 @@ begin
task :rebuild => :check_for_pending_changes do
tarballs.each do |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
......
......@@ -119,12 +119,6 @@ case "${TARGETED_DEVICE_FAMILY}" in
;;
esac
realpath() {
DIRECTORY="$(cd "${1%/*}" && pwd)"
FILENAME="${1##*/}"
echo "$DIRECTORY/$FILENAME"
}
install_resource()
{
if [[ "$1" = /* ]] ; then
......@@ -166,7 +160,7 @@ EOM
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH")
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
......@@ -195,7 +189,7 @@ then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
while read line; do
if [[ $line != "`realpath $PODS_ROOT`*" ]]; then
if [[ $line != "${PODS_ROOT}*" ]]; then
XCASSET_FILES+=("$line")
fi
done <<<"$OTHER_XCASSETS"
......
......@@ -241,9 +241,9 @@ module Pod
build_phase = native_target.new_shell_script_build_phase('Create Symlinks to Header Folders')
build_phase.shell_script = <<-eos.strip_heredoc
cd "$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME"
ln -fs ${PUBLIC_HEADERS_FOLDER_PATH\#$WRAPPER_NAME/} ${PUBLIC_HEADERS_FOLDER_PATH\#\$CONTENTS_FOLDER_PATH/}
ln -fs ${PRIVATE_HEADERS_FOLDER_PATH\#\$WRAPPER_NAME/} ${PRIVATE_HEADERS_FOLDER_PATH\#\$CONTENTS_FOLDER_PATH/}
base="$CONFIGURATION_BUILD_DIR/$WRAPPER_NAME"
ln -fs $base/${PUBLIC_HEADERS_FOLDER_PATH\#$WRAPPER_NAME/} $base/${PUBLIC_HEADERS_FOLDER_PATH\#\$CONTENTS_FOLDER_PATH/}
ln -fs $base/${PRIVATE_HEADERS_FOLDER_PATH\#\$WRAPPER_NAME/} $base/${PRIVATE_HEADERS_FOLDER_PATH\#\$CONTENTS_FOLDER_PATH/}
eos
end
......
Subproject commit 6efec430148b581610f82f67947f0d12ebd62ce4
Subproject commit 261c576b588e6c8d9729cdbb9c4751f7b10f4ee7
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment