<commit_before>#!/usr/bin/env bash

HUB=https://raw.githubusercontent.com/yumminhuang/dotfiles/master/files

# Function Declarations

# $1: File name
# $2: Directory name
download_to () {
    file=$1
    destination=$2
    echo Download .$file to $destination
    if [ ! -z "$3" ]
      then
        new_name=$3
        curl -L $HUB/$file > $destination/$new_name
    else
        curl -L $HUB/$file > $destination/.$file
    fi
}

# Mian Logic: Downloading dot files
main () {
    # what OS?
    case "$(uname)" in
        Darwin)
            echo 'Install dotfiles for Mac'
            download_to 'zshrc' ~
            ;;
        Linux)
            echo 'Install dotfiles for Linux'
            download_to 'bash_profile' ~
            download_to 'bashrc' ~

            if which i3 >/dev/null; then
                echo 'i3 exists'
                # Create .config directory
                if [ ! -d '~/.config' ]; then
                    mkdir -p ~/.config
                fi
                download_to 'i3_config' ~/.config/i3 config
                download_to 'i3status_config' ~/.config/i3status config
            else
                echo 'i3 does not exist'
            fi

            # Dowload bash-powerline.sh
            curl https://raw.github.com/riobard/bash-powerline/master/bash-powerline.sh > ~/.bash-powerline.sh
            ;;
        *)
            echo 'Not support this OS'
    esac
    # Both Linux and Mac need following files
    download_to 'profile' ~
    download_to 'vimrc' ~
    download_to 'gitconfig' ~
    download_to 'gitignore_global' ~
    download_to 'tmux.conf' ~
}

main "$@"
<commit_msg>Fix link to bash-powerline.sh<commit_after>#!/usr/bin/env bash

HUB=https://raw.githubusercontent.com/yumminhuang/dotfiles/master/files

# Function Declarations

# $1: File name
# $2: Directory name
download_to () {
    file=$1
    destination=$2
    echo Download .$file to $destination
    if [ ! -z "$3" ]
      then
        new_name=$3
        curl -L $HUB/$file > $destination/$new_name
    else
        curl -L $HUB/$file > $destination/.$file
    fi
}

# Mian Logic: Downloading dot files
main () {
    # what OS?
    case "$(uname)" in
        Darwin)
            echo 'Install dotfiles for Mac'
            download_to 'zshrc' ~
            ;;
        Linux)
            echo 'Install dotfiles for Linux'
            download_to 'bash_profile' ~
            download_to 'bashrc' ~

            if which i3 >/dev/null; then
                echo 'i3 exists'
                # Create .config directory
                if [ ! -d '~/.config' ]; then
                    mkdir -p ~/.config
                fi
                download_to 'i3_config' ~/.config/i3 config
                download_to 'i3status_config' ~/.config/i3status config
            else
                echo 'i3 does not exist'
            fi

            # Dowload bash-powerline.sh
            curl https://raw.githubusercontent.com/riobard/bash-powerline/master/bash-powerline.sh > ~/.bash-powerline.sh
            ;;
        *)
            echo 'Not support this OS'
    esac
    # Both Linux and Mac need following files
    download_to 'profile' ~
    download_to 'vimrc' ~
    download_to 'gitconfig' ~
    download_to 'gitignore_global' ~
    download_to 'tmux.conf' ~
}

main "$@"

{'fraction_non_alphanumeric': 0.10724023023326265, 'fraction_numerical': 0.007876401090578612, 'mean_word_length': 1.6373801916932906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1811731', 'n_tokens_mistral': 1044, 'n_tokens_neox': 992, 'n_words': 255}