-
Notifications
You must be signed in to change notification settings - Fork 28
/
mkplugin
executable file
·38 lines (30 loc) · 1.48 KB
/
mkplugin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -u
set -e
CURRENT_DIR=$( /bin/pwd )
SIM_DEVICES="${HOME}/Library/Developer/CoreSimulator/Devices/"
SIM_APPS="/data/Containers/Bundle/Application/"
CP_XCODE_SIM=0
cd ../airbitz-plugins
find plugins -maxdepth 1 -mindepth 1 | sed -e 's/plugins\///' | xargs -I {} bash -c 'gulp {}-ios;'
cd ${CURRENT_DIR}
find ../airbitz-plugins/plugins -maxdepth 1 -mindepth 1 | sed -e 's/\.\.\/airbitz-plugins\/plugins\///' | xargs -I {} bash -c 'cp ../airbitz-plugins/build/ios/{}/index.html Airbitz/Resources/plugins/{}.html;'
#gulp glidera-ios
#gulp foldapp-ios
#gulp clevercoin-ios
#cp build/ios/glidera/index.html ${CURRENT_DIR}/Airbitz/Resources/plugins/glidera.html
#cp build/ios/foldapp/index.html ${CURRENT_DIR}/Airbitz/Resources/plugins/foldapp.html
#cp build/ios/clevercoin/index.html ${CURRENT_DIR}/Airbitz/Resources/plugins/clevercoin.html
if [ ${CP_XCODE_SIM} == 1 ]
then
cd ${SIM_DEVICES}
CURRENT_DEVICE=$( ls -1dt ./* | head -n 1 )
cd ${CURRENT_DEVICE}${SIM_APPS}
CURRENT_APP=$( ls -1dt ./* | head -n 1 )
cd ${CURRENT_APP}
APP_NAME=$( ls -1dt *.app )
echo "Copying plugins to most recently active simulator"
cp ${CURRENT_DIR}/Airbitz/Resources/plugins/foldapp.html ${SIM_DEVICES}${CURRENT_DEVICE}${SIM_APPS}${CURRENT_APP}/${APP_NAME}/
cp ${CURRENT_DIR}/Airbitz/Resources/plugins/glidera.html ${SIM_DEVICES}${CURRENT_DEVICE}${SIM_APPS}${CURRENT_APP}/${APP_NAME}/
cp ${CURRENT_DIR}/Airbitz/Resources/plugins/clevercoin.html ${SIM_DEVICES}${CURRENT_DEVICE}${SIM_APPS}${CURRENT_APP}/${APP_NAME}/
fi