Skip to content

Commit

Permalink
af: Update symlinks script to use relative path from symlink location (
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket authored Dec 15, 2023
1 parent 8e07916 commit fce0bc2
Show file tree
Hide file tree
Showing 61 changed files with 68 additions and 61 deletions.
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Assets/.gitkeep
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/Auth0FlutterPlugin.h
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/Auth0FlutterPlugin.m
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/AuthAPI/AuthAPIExtensions.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/AuthAPI/AuthAPIHandler.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/Extensions.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/HandlerError.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/MethodHandler.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/Models.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/Properties.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/SwiftAuth0FlutterPlugin.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/WebAuth/WebAuthExtensions.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/WebAuth/WebAuthHandler.swift
2 changes: 1 addition & 1 deletion auth0_flutter/ios/Classes/WebAuth/WebAuthModels.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Assets/.gitkeep
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/Auth0FlutterPlugin.h
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/Auth0FlutterPlugin.m
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/AuthAPI/AuthAPIHandler.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/Extensions.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/HandlerError.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/MethodHandler.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/Models.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/Properties.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/SwiftAuth0FlutterPlugin.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/WebAuth/WebAuthHandler.swift
2 changes: 1 addition & 1 deletion auth0_flutter/macos/Classes/WebAuth/WebAuthModels.swift
9 changes: 8 additions & 1 deletion scripts/generate-symlinks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ for file in "${files[@]}"; do
# If it's a .gitignore or Podspec file, copy it
(*'.gitignore' | *'.podspec') cp -v "$file" "$target_dir" ;;
# Else symlink it
(*) ln -sv "$file" "$target_file" ;;
(*)
# Calculate the relative path to the file from the symlink's
# location
file_subpath=${file#"$base_dir/"}
file_depth=$(echo "$file_subpath" | awk -F '/' '{print NF-1}')
file_relpath=$(printf '../%.0s' $(seq 1 $file_depth))

ln -sv "$file_relpath$file_subpath" "$target_file" ;;
esac
done
done
Expand Down

0 comments on commit fce0bc2

Please sign in to comment.