mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Productivity: createScreen.sh: Fix subFolder parameter again
This commit is contained in:
parent
8d146164b8
commit
131be3ccf0
2 changed files with 9 additions and 19 deletions
|
@ -7,10 +7,10 @@ This is the boilerplate to create a screen that follows the MVVM-C pattern withi
|
|||
|
||||
To use it (before it becomes an Xcode template):
|
||||
|
||||
- `./createScreen.sh MyScreen [subFolder]`
|
||||
- `./createScreen.sh ScreenFolder MyScreenName`
|
||||
- Import the created folder in the Xcode project
|
||||
|
||||
`subFolder` is an option subfolder under `Riot/Modules/`
|
||||
This will create ScreenFolder within the Riot/Modules. Files inside will be called `MyScreenNameXxx`.
|
||||
|
||||
|
||||
# FlowCoordinatorTemplate
|
||||
|
@ -21,4 +21,4 @@ To use it (before it becomes an Xcode template):
|
|||
- `./createFlowCoordinator.sh MyFlowCoordinator [subFolder]`
|
||||
- Import the created folder in the Xcode project
|
||||
|
||||
`subFolder` is an option subfolder under `Riot/Modules/`
|
||||
`subFolder` is an option subfolder under `Riot/Modules/`
|
||||
|
|
|
@ -1,27 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: ./createScreen.sh MyScreen [subFolder]"
|
||||
if [ ! $# -eq 2 ]; then
|
||||
echo "Usage: ./createScreen.sh Folder MyScreenName"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCREEN_NAME=$1
|
||||
OUTPUT_DIR="../../Riot/Modules"/$1
|
||||
SCREEN_NAME=$2
|
||||
SCREEN_VAR_NAME=`echo $SCREEN_NAME | awk '{ print tolower(substr($0, 1, 1)) substr($0, 2) }'`
|
||||
|
||||
MODULE_DIR="../../Riot/Modules"
|
||||
|
||||
OUTPUT_DIR="$MODULE_DIR"
|
||||
if [ $# -eq 2 ];
|
||||
then
|
||||
OUTPUT_DIR="$OUTPUT_DIR/$2"
|
||||
if [ ! -e $OUTPUT_DIR ]; then
|
||||
echo "Create folder ${OUTPUT_DIR}"
|
||||
mkdir $OUTPUT_DIR
|
||||
fi
|
||||
fi
|
||||
OUTPUT_DIR="$OUTPUT_DIR/$1"
|
||||
|
||||
|
||||
if [ -e $OUTPUT_DIR ]; then
|
||||
echo "Error: Folder ${OUTPUT_DIR} already exists"
|
||||
exit 1
|
||||
|
@ -29,7 +18,8 @@ fi
|
|||
|
||||
echo "Create folder ${OUTPUT_DIR}"
|
||||
|
||||
cp -R buildable/ScreenTemplate $OUTPUT_DIR
|
||||
mkdir -p $OUTPUT_DIR
|
||||
cp -R buildable/ScreenTemplate/ $OUTPUT_DIR/
|
||||
|
||||
cd $OUTPUT_DIR
|
||||
for file in *
|
||||
|
|
Loading…
Reference in a new issue