diff --git a/ownCloud/Resources/Theming/generate.sh b/ownCloud/Resources/Theming/generate.sh new file mode 100755 index 000000000..9059cf5ae --- /dev/null +++ b/ownCloud/Resources/Theming/generate.sh @@ -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 \ No newline at end of file