Skip to content

Commit

Permalink
generate.sh for easy theme generation (#1281)
Browse files Browse the repository at this point in the history
* genrate.sh for easy theme generation

* check if script is executed in the correct path

* changed wording

---------

Co-authored-by: Michael Stingl <[email protected]>
Co-authored-by: Matthias Hühne <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2023
1 parent d5c1ba5 commit 196aa45
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ownCloud/Resources/Theming/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# PREREQUISITE
# Create symlink
# ln -s SYNCDIR\ Config\ Data/5500Z000003poZfQAI/ios/current ~/Developer/github.com/owncloud/ios-app/ownCloud/Resources/Theming/theme.damken

current_dir=$(pwd)
theming_dir="/ownCloud/Resources/Theming"
theme=$1

if [ -d "$theming_dir" ]; then
git submodule init
git submodule update

rename 's/current./theme./' $current_dir$theming_dir/*.*
mv $current_dir$theming_dir/theme.$theme $current_dir$theming_dir/current.$theme

cp $current_dir$theming_dir/current*/*.png $current_dir$theming_dir/
cp $current_dir$theming_dir/current*/*.json $current_dir$theming_dir/Branding.json

fastlane generate_appicon

gomplate --file ./tools/gomplate/Branding.plist.tmpl \
--context config=$current_dir$theming_dir/Branding.json \
--out $current_dir$theming_dir/Branding.plist
else
echo "Directory $theming_dir does not exist. Please execute this script in the root path of the ios-app repository."
fi

0 comments on commit 196aa45

Please sign in to comment.