<commit_before>#!/bin/bash

echo "This script requires node-webkit.app in your applications folder"

TARGET_DIR="${HOME}/postbird.app"
APP_TARGET_DIR="${TARGET_DIR}/Contents/Resources/app.nw"
echo $TARGET_DIR


if [ -e "$TARGET_DIR" ]; then
  echo "Removing existing build"
  rm -rf $TARGET_DIR
fi

#read -p "Is node-webkit.app in your applications folder (y/n)? " -n 1 -r
#if [[ $REPLY =~ ^[Yy]$ ]]
#then
    # node-webkit exists continue build
    cp -r /Applications/node-webkit.app ${TARGET_DIR}

    # create app.nw and move to correct location
    git checkout-index -a --prefix="${APP_TARGET_DIR}/"
    #cp -r . ~/postbird.app/Contents/Resources/app.nw

    rm ${APP_TARGET_DIR}/build.sh
    rm ${APP_TARGET_DIR}/run
    rm ${APP_TARGET_DIR}/pg.icns
    rm ${APP_TARGET_DIR}/pg.png
    rm ${APP_TARGET_DIR}/info.plist
    rm -rf ${APP_TARGET_DIR}/notifier.app

    # copy icon and plist file
    cp ./pg.icns ${TARGET_DIR}/Contents/Resources
    cp ./info.plist ${TARGET_DIR}/Contents

    cp ./pg.icns ${TARGET_DIR}/Contents/Resources

    # mv postbird.app ../../bin/

    echo -e "\npostbird.app copied to home directory"
#else
#  echo -e "\nPlease place node-webkit.app in your applications folder and run the script again"
#fi<commit_msg>Build script for postbird.nw release<commit_after>#!/bin/bash

echo "This script requires node-webkit.app in your applications folder"

TARGET_DIR="${HOME}/postbird.app"
APP_TARGET_DIR="${TARGET_DIR}/Contents/Resources/app.nw"
echo $TARGET_DIR


if [ -e "$TARGET_DIR" ]; then
  echo "Removing existing build"
  rm -rf $TARGET_DIR
fi

if [ -e "$HOME/postbird.nw" ]; then
  echo "Removing existing nw build"
  rm -rf $HOME/postbird.nw
fi

#read -p "Is node-webkit.app in your applications folder (y/n)? " -n 1 -r
#if [[ $REPLY =~ ^[Yy]$ ]]
#then
    # node-webkit exists continue build
    cp -r /Applications/node-webkit.app ${TARGET_DIR}

    # create app.nw and move to correct location
    git checkout-index -a --prefix="${APP_TARGET_DIR}/"
    #cp -r . ~/postbird.app/Contents/Resources/app.nw

    rm ${APP_TARGET_DIR}/build.sh
    rm ${APP_TARGET_DIR}/run
    rm ${APP_TARGET_DIR}/pg.icns
    rm ${APP_TARGET_DIR}/pg.png
    rm ${APP_TARGET_DIR}/info.plist
    rm -rf ${APP_TARGET_DIR}/notifier.app

    # copy icon and plist file
    cp ./pg.icns ${TARGET_DIR}/Contents/Resources
    cp ./info.plist ${TARGET_DIR}/Contents

    cp ./pg.icns ${TARGET_DIR}/Contents/Resources

    # mv postbird.app ../../bin/

    echo -e "\npostbird.app copied to home directory"
    tmp_dir=`pwd`
    cd ${APP_TARGET_DIR}
    zip -r -q ~/postbird.nw *
    cd $tmp_dir
#else
#  echo -e "\nPlease place node-webkit.app in your applications folder and run the script again"
#fi
{'fraction_non_alphanumeric': 0.14033149171270717, 'fraction_numerical': 0.0007366482504604051, 'mean_word_length': 3.217391304347826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2152660', 'n_tokens_mistral': 978, 'n_tokens_neox': 928, 'n_words': 259}