- to prevent problems due to white space.
Change-Id: Id349ee59248c068d11466cdd960f6fb9d58174b5
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
clean()
{
echo "$SRCDIR"
- rm -rf $SRCDIR/*.jar
- rm -rf $SRCDIR/*.zip
- rm -rf $SRCDIR/*.tar.gz
+ rm -rf "$SRCDIR/"*.jar
+ rm -rf "$SRCDIR/"*.zip
+ rm -rf "$SRCDIR/"*.tar.gz
}
# build
build()
{
cd $SRCDIR
- ant -buildfile build.xml -Dclasspath.dibs=$ROOTDIR/tools/emulator/bin make-jar-dibs
+ ant -buildfile build.xml -Dclasspath.dibs="$ROOTDIR/tools/emulator/bin" make-jar-dibs
}
# install
install()
{
BIN_DIR=$SRCDIR/package/emulator-manager.package.$TARGET_OS/data/tools/emulator
- mkdir -p $BIN_DIR/bin
- mkdir -p $BIN_DIR/icons
+ mkdir -p "$BIN_DIR/bin"
+ mkdir -p "$BIN_DIR/icons"
- mv $SRCDIR/emulator-manager.jar $BIN_DIR/bin
- cp $SRCDIR/supplement/emulator-manager.sh $BIN_DIR/bin/emulator-manager
- cp $SRCDIR/supplement/em-cli.sh $BIN_DIR/bin/em-cli
- cp $SRCDIR/resource/res/em.ico $BIN_DIR/icons
+ mv "$SRCDIR/emulator-manager.jar" "$BIN_DIR/bin"
+ cp "$SRCDIR/supplement/emulator-manager.sh" "$BIN_DIR/bin/emulator-manager"
+ cp "$SRCDIR/supplement/em-cli.sh" "$BIN_DIR/bin/em-cli"
+ cp "$SRCDIR/resource/res/em.ico" "$BIN_DIR/icons"
}
[ "$1" = "clean" ] && clean
clean()
{
echo "$SRCDIR"
- rm -rf $SRCDIR/*.jar
- rm -rf $SRCDIR/*.zip
- rm -rf $SRCDIR/*.tar.gz
+ rm -rf "$SRCDIR/"*.jar
+ rm -rf "$SRCDIR/"*.zip
+ rm -rf "$SRCDIR/"*.tar.gz
}
# build
build()
{
cd $SRCDIR
- ant -buildfile build.xml -Dclasspath.dibs=${ROOTDIR}/tools/emulator/bin make-jar-dibs
+ ant -buildfile build.xml -Dclasspath.dibs="${ROOTDIR}/tools/emulator/bin" make-jar-dibs
}
# install
install()
{
BIN_DIR=$SRCDIR/package/emulator-manager.package.$TARGET_OS/data/tools/emulator
- mkdir -p $BIN_DIR/bin
- mkdir -p $BIN_DIR/icons
+ mkdir -p "$BIN_DIR/bin"
+ mkdir -p "$BIN_DIR/icons"
- mv $SRCDIR/emulator-manager.jar $BIN_DIR/bin
- cp $SRCDIR/supplement/emulator-manager-mac.sh $BIN_DIR/bin/emulator-manager
- cp $SRCDIR/supplement/em-cli-mac.sh $BIN_DIR/bin/em-cli
- cp $SRCDIR/resource/res/em.ico $BIN_DIR/icons
+ mv "$SRCDIR/emulator-manager.jar" "$BIN_DIR/bin"
+ cp "$SRCDIR/supplement/emulator-manager-mac.sh" "$BIN_DIR/bin/emulator-manager"
+ cp "$SRCDIR/supplement/em-cli-mac.sh" "$BIN_DIR/bin/em-cli"
+ cp "$SRCDIR/resource/res/em.ico" "$BIN_DIR/icons"
# for emulator-manager.app
APP_DIR=$SRCDIR/emulator-manager.app/Contents
- mkdir -p $APP_DIR/MacOS
- mkdir -p $APP_DIR/Resources
+ mkdir -p "$APP_DIR/MacOS"
+ mkdir -p "$APP_DIR/Resources"
- cp $SRCDIR/resource/res/em.icns $APP_DIR/Resources/
- cp $SRCDIR/supplement/emulator-manager-mac-app.sh $APP_DIR/MacOS/emulator-manager
- cp $SRCDIR/supplement/info-mac-app.plist $APP_DIR/Info.plist
+ cp "$SRCDIR/resource/res/em.icns" "$APP_DIR/Resources/"
+ cp "$SRCDIR/supplement/emulator-manager-mac-app.sh" "$APP_DIR/MacOS/emulator-manager"
+ cp "$SRCDIR/supplement/info-mac-app.plist" "$APP_DIR/Info.plist"
# for signing to "emulator-manager.app"
- codesign -f -s "Developer ID Application: Samsung Electronics" -v $SRCDIR/emulator-manager.app
- spctl --assess --type execute $SRCDIR/emulator-manager.app
+ codesign -f -s "Developer ID Application: Samsung Electronics" -v "$SRCDIR/emulator-manager.app"
+ spctl --assess --type execute "$SRCDIR/emulator-manager.app"
CODESIGN_RET=$?
echo $CODESIGN_RET
if [ "$CODESIGN_RET" = "0" ]; then
exit 1
fi
- mv $SRCDIR/emulator-manager.app $BIN_DIR/bin
+ mv "$SRCDIR/emulator-manager.app" "$BIN_DIR/bin"
}
[ "$1" = "clean" ] && clean
clean()
{
echo "$SRCDIR"
- rm -rf $SRCDIR/*.jar
- rm -rf $SRCDIR/*.zip
- rm -rf $SRCDIR/*.tar.gz
+ rm -rf "$SRCDIR/"*.jar
+ rm -rf "$SRCDIR/"*.zip
+ rm -rf "$SRCDIR/"*.tar.gz
}
prepare()
prepare
cd $SRCDIR
- ant -buildfile build.xml -Dclasspath.dibs=${ROOTDIR}/tools/emulator/bin make-jar-dibs
+ ant -buildfile build.xml -Dclasspath.dibs="${ROOTDIR}/tools/emulator/bin" make-jar-dibs
# make emulator-manager.exe with Launch4j
LAUNCH4J_RUN=0
else
echo "Generating emulator-manager.exe SUCCESS."
# Add signing to emulator-manager.exe
- java -jar $SIGNTOOL_JAR $SRCDIR/emulator-manager.exe $SRCDIR/emulator-manager.exe emulator-manager.exe
+ java -jar "$SIGNTOOL_JAR" "$SRCDIR/emulator-manager.exe" "$SRCDIR/emulator-manager.exe" emulator-manager.exe
if [ ! -f "$SRCDIR/emulator-manager.exe" ]; then
echo "Codesigning fail"
exit 1
install()
{
BIN_DIR=$SRCDIR/package/emulator-manager.package.$TARGET_OS/data/tools/emulator
- mkdir -p $BIN_DIR/bin
- mkdir -p $BIN_DIR/icons
+ mkdir -p "$BIN_DIR/bin"
+ mkdir -p "$BIN_DIR/icons"
# mkdir -p $BIN_DIR/templates
- mv $SRCDIR/emulator-manager.jar $BIN_DIR/bin
- cp $SRCDIR/emulator-manager.exe $BIN_DIR/bin/emulator-manager.exe
- cp $SRCDIR/supplement/em-cli.bat $BIN_DIR/bin/em-cli.bat
- cp $SRCDIR/resource/res/em.ico $BIN_DIR/icons
+ mv "$SRCDIR/emulator-manager.jar" "$BIN_DIR/bin"
+ cp "$SRCDIR/emulator-manager.exe" "$BIN_DIR/bin/emulator-manager.exe"
+ cp "$SRCDIR/supplement/em-cli.bat" "$BIN_DIR/bin/em-cli.bat"
+ cp "$SRCDIR/resource/res/em.ico" "$BIN_DIR/icons"
}
[ "$1" = "clean" ] && clean