Skip to content

Instantly share code, notes, and snippets.

@Kegn
Created July 21, 2017 07:35
Show Gist options
  • Save Kegn/38b38d6f0fd05ec5cf4c70ea35261f69 to your computer and use it in GitHub Desktop.
Save Kegn/38b38d6f0fd05ec5cf4c70ea35261f69 to your computer and use it in GitHub Desktop.

Revisions

  1. Kegn created this gist Jul 21, 2017.
    34 changes: 34 additions & 0 deletions ginit.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    #!/bin/bash

    if [ -f /etc/gitprompt ]; then
    source /etc/gitprompt
    fi

    PS1="\[$(tput bold)\]\[$(tput setaf 1)│\[$(tput setaf 5)\]\u\[$(tput setaf 6)\]@\[$(tput setaf 7)\]\h \[$(tput setaf 1)\]git\[$(tput setaf 7)\] : \[$(tput setaf 2)\]\W\[$(tput setaf 1)\]│\[$(tput setaf 6)\]→\[$(tput setaf 5)\] "

    shxcolors () {
    for color in {0..16}; do {
    echo "$(tput sgr0)$(tput setaf $color) Here is color number $color in specified by tput "
    echo "$(tput bold)$(tput setaf $color) Here is color number $color in specified by tput bold"
    echo "$(tput setaf 0) ----------------------------------------------------"
    }
    done
    }


    ginit () {
    git init
    touch README.md
    if [ $(cat README.md | wc -l) == 0 ]; then
    echo "#" >> README.md
    echo "# author : kegn" >> README.md
    echo "# github : https://github.com/kegn" >> README.md
    echo "# e-mail : [email protected]" >> README.md
    touch LICENSE
    cat ~/.licenses/GPL3.0 >> LICENSE
    mkdir build
    mkdir src
    mkdir test
    mkdir tools
    fi
    }