update
This commit is contained in:
86
ios/bin/install.zsh
Normal file
86
ios/bin/install.zsh
Normal file
@@ -0,0 +1,86 @@
|
||||
#!/bin/zsh
|
||||
|
||||
if [ "$1" = "social-app-custom" ];then
|
||||
at-social-app-custom-pages
|
||||
at-social-app-custom-screens
|
||||
at-social-app-aiat-config
|
||||
at-social-app-aiat-logo
|
||||
at-origin-social-app
|
||||
exit
|
||||
fi
|
||||
|
||||
function at-social-app-custom-pages() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "copying custom components to social-app"
|
||||
|
||||
# Create components directory if not exists
|
||||
mkdir -p ${d_}/src/components/custom
|
||||
|
||||
# Copy custom components
|
||||
cp ${custom}/PrivacyContent.tsx ${d_}/src/components/custom/
|
||||
cp ${custom}/AppInfo.tsx ${d_}/src/components/custom/
|
||||
|
||||
echo "custom components copied successfully"
|
||||
}
|
||||
|
||||
function at-social-app-aiat-config() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "applying Aiat configuration"
|
||||
|
||||
# Update app.config.js
|
||||
cd ${d_}
|
||||
|
||||
# Backup original
|
||||
cp app.config.js app.config.js.orig
|
||||
|
||||
# Apply changes using sed
|
||||
sed -i "s/name: 'Bluesky'/name: 'Aiat'/g" app.config.js
|
||||
sed -i "s/slug: 'bluesky'/slug: 'aiat'/g" app.config.js
|
||||
sed -i "s/scheme: 'bluesky'/scheme: 'aiat'/g" app.config.js
|
||||
sed -i "s/owner: 'blueskysocial'/owner: 'syui'/g" app.config.js
|
||||
sed -i "s/bundleIdentifier: 'xyz.blueskyweb.app'/bundleIdentifier: 'ai.syui.at'/g" app.config.js
|
||||
|
||||
# Update package.json name
|
||||
sed -i 's/"name": "bsky.app"/"name": "aiat"/g' package.json
|
||||
|
||||
echo "Aiat configuration applied"
|
||||
}
|
||||
|
||||
function at-social-app-aiat-logo() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "applying Aiat logo"
|
||||
|
||||
# Create logo directory if not exists
|
||||
mkdir -p ${custom}/assets
|
||||
|
||||
# Copy logo if exists in custom folder
|
||||
if [ -f ${custom}/assets/icon.png ]; then
|
||||
cp ${custom}/assets/icon.png ${d_}/assets/app-icons/ios_icon_default_next.png
|
||||
echo "Aiat logo applied"
|
||||
else
|
||||
echo "Warning: Logo file not found at ${custom}/assets/icon.png"
|
||||
echo "Please add your logo file there"
|
||||
fi
|
||||
}
|
||||
|
||||
function at-social-app-custom-screens() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "applying custom screens"
|
||||
|
||||
# Copy custom screen files
|
||||
cp ${custom}/PrivacyPolicy.screen.tsx ${d_}/src/view/screens/PrivacyPolicy.tsx
|
||||
cp ${custom}/Support.screen.tsx ${d_}/src/view/screens/Support.tsx
|
||||
cp ${custom}/LicenseNotice.tsx ${d_}/src/components/custom/
|
||||
|
||||
echo "custom screens applied"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user