diff -Nru churpeau-1.7.4~saucy/ch-common.lib churpeau-1.7.9~saucy/ch-common.lib --- churpeau-1.7.4~saucy/ch-common.lib 2013-05-27 09:46:47.000000000 +0000 +++ churpeau-1.7.9~saucy/ch-common.lib 2014-04-21 14:45:22.000000000 +0000 @@ -15,12 +15,23 @@ fi } +# Yellow bold displayTitle(){ echo "\033[33m> \033[1m" $1 "\033[0m" } +# Yellow displaySubtitle(){ echo "\033[33m» " $1 "\033[0m" } +# Purple +displayWarning(){ + echo "\033[35m" $1 "\033[0m" +} +# Green +displaySuccess(){ + echo "\033[32m" $1 "\033[0m" +} + yesOrNo(){ local message diff -Nru churpeau-1.7.4~saucy/config/ch.bash.bashrc churpeau-1.7.9~saucy/config/ch.bash.bashrc --- churpeau-1.7.4~saucy/config/ch.bash.bashrc 2013-10-22 06:37:13.000000000 +0000 +++ churpeau-1.7.9~saucy/config/ch.bash.bashrc 2014-04-20 15:28:48.000000000 +0000 @@ -4,11 +4,7 @@ # this file has to be sourced in /etc/profile. # If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - +[ -z "$PS1" ] && return #------------------------------------------------------------- # History @@ -313,19 +309,19 @@ # if the command-not-found package is installed, use it if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then - function command_not_found_handle { - # check because c-n-f could've been removed in the meantime - if [ -x /usr/lib/command-not-found ]; then - /usr/lib/command-not-found -- "$1" - return $? - elif [ -x /usr/share/command-not-found/command-not-found ]; then - /usr/share/command-not-found/command-not-found -- "$1" - return $? - else - printf "%s: command not found\n" "$1" >&2 - return 127 - fi - } + function command_not_found_handle { + # check because c-n-f could've been removed in the meantime + if [ -x /usr/lib/command-not-found ]; then + /usr/lib/command-not-found -- "$1" + return $? + elif [ -x /usr/share/command-not-found/command-not-found ]; then + /usr/share/command-not-found/command-not-found -- "$1" + return $? + else + printf "%s: command not found\n" "$1" >&2 + return 127 + fi + } fi @@ -388,6 +384,9 @@ #------------------------------------------------------------- alias ..='cd ..' +alias ....='cd ../..' +alias ......='cd ../../..' +alias ........='cd ../../../..' alias df='df -h' alias du='du -h' alias rm='rm -i' @@ -396,7 +395,7 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' -alias gitStashAndPull='git stash && git pull && git stash apply' +alias gitStashAndPull='git stash && git pull && git stash pop' #------------------------------------------------------------- @@ -426,7 +425,3 @@ unset color_prompt - - -echo $- | grep -qs i && byobu-launcher && exit 0 - diff -Nru churpeau-1.7.4~saucy/debian/changelog churpeau-1.7.9~saucy/debian/changelog --- churpeau-1.7.4~saucy/debian/changelog 2014-01-22 15:38:34.000000000 +0000 +++ churpeau-1.7.9~saucy/debian/changelog 2014-04-21 15:35:09.000000000 +0000 @@ -1,3 +1,33 @@ +churpeau (1.7.9~saucy) saucy; urgency=medium + + * saucy + + -- Christophe Hurpeau Mon, 21 Apr 2014 17:34:28 +0200 + +churpeau (1.7.9~trusty) trusty; urgency=medium + + * git-statuses script + + -- Christophe Hurpeau Mon, 21 Apr 2014 17:29:40 +0200 + +churpeau (1.7.8~trusty) trusty; urgency=medium + + * fix + + -- Christophe Hurpeau Sun, 20 Apr 2014 18:50:43 +0200 + +churpeau (1.7.7~trusty) trusty; urgency=medium + + * remove apt-fast and fix warnings + + -- Christophe Hurpeau Sun, 20 Apr 2014 18:35:09 +0200 + +churpeau (1.7.6~trusty) trusty; urgency=medium + + * first trusty release + + -- Christophe Hurpeau Sun, 20 Apr 2014 17:29:22 +0200 + churpeau (1.7.4~saucy) saucy; urgency=high * fix openlocalfile diff -Nru churpeau-1.7.4~saucy/debian/ch-scripts.install churpeau-1.7.9~saucy/debian/ch-scripts.install --- churpeau-1.7.4~saucy/debian/ch-scripts.install 2013-11-09 10:36:18.000000000 +0000 +++ churpeau-1.7.9~saucy/debian/ch-scripts.install 2014-04-21 15:30:58.000000000 +0000 @@ -1,8 +1,9 @@ ch-common.lib /var/lib/christophe-hurpeau scripts/upgrade /usr/sbin -scripts/extract /usr/sbin -scripts/maketar /usr/sbin -scripts/makezip /usr/sbin +scripts/extract /usr/bin +scripts/maketar /usr/bin +scripts/makezip /usr/bin scripts/nano /usr/sbin scripts/open-or-focus /usr/sbin scripts/clone /usr/sbin +scripts/git-statuses /usr/bin diff -Nru churpeau-1.7.4~saucy/debian/control churpeau-1.7.9~saucy/debian/control --- churpeau-1.7.4~saucy/debian/control 2014-01-21 01:10:38.000000000 +0000 +++ churpeau-1.7.9~saucy/debian/control 2014-04-20 16:50:02.000000000 +0000 @@ -8,54 +8,53 @@ Package: churpeau Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, bash, ch-scripts, ch-config, ch-gnome-terminal +Depends: ${misc:Depends}, bash, ch-scripts, ch-config, ch-gnome-terminal Description: Christophe Hurpeau Scripts & Config Package: ch-scripts Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, bash, apt-fast (>= 1.8.1~), xclip, make +Depends: ${misc:Depends}, bash, xclip, make, htop Description: Christophe Hurpeau Scripts Package: ch-config Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, bash, byobu -Conflicts: nautilus-open-terminal +Depends: ${misc:Depends}, bash, zsh Description: Christophe Hurpeau config files (bashrc, nanorc) Package: ch-gnome-terminal Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, bash, wmctrl +Depends: ${misc:Depends}, bash, wmctrl Description: Christophe Hurpeau gnome-terminal single instance Package: ch-gnome-shell Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-shell-theme-elegance-colors +Depends: ${misc:Depends}, gnome-shell-theme-elegance-colors Description: Christophe Hurpeau gnome shell config and dependencies Package: ch-server Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, bash, git, unzip, zip, ch-scripts, ch-config, monit, munin-node, fail2ban +Depends: ${misc:Depends}, bash, git, unzip, zip, ch-scripts, ch-config, monit, munin-node, fail2ban Description: Christophe Hurpeau server dependencies Package: ch-apache-and-php-and-mysql Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, libapache2-mod-php5, php5 (>= 5.4), php5-cli, php5-curl, php5-gd, php5-imagick, php5-mcrypt, php5-mysql, php5-sqlite, php5-xmlrpc, mysql-client, mysql-server +Depends: ${misc:Depends}, libapache2-mod-php5, php5 (>= 5.4), php5-cli, php5-curl, php5-gd, php5-imagick, php5-mcrypt, php5-mysql, php5-sqlite, php5-xmlrpc, mysql-client, mysql-server Description: Christophe Hurpeau apache and php and mysql dependencies and config Package: ch-launchpad Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, bash, packaging-dev +Depends: ${misc:Depends}, bash, packaging-dev Description: http://developer.ubuntu.com/packaging/html/getting-set-up.html Package: ch-open-local-file Section: utils Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, bash, xdg-utils +Depends: ${misc:Depends}, bash, xdg-utils Description: openlocalfile:// protocol diff -Nru churpeau-1.7.4~saucy/gnome-terminal/gnome-terminal.singleInstance churpeau-1.7.9~saucy/gnome-terminal/gnome-terminal.singleInstance --- churpeau-1.7.4~saucy/gnome-terminal/gnome-terminal.singleInstance 2013-11-09 09:51:17.000000000 +0000 +++ churpeau-1.7.9~saucy/gnome-terminal/gnome-terminal.singleInstance 2014-04-20 17:22:21.000000000 +0000 @@ -1,3 +1,7 @@ #!/bin/sh -open-or-focus gnome-terminal $* +if [ $# = 0 ]; then + open-or-focus gnome-terminal $* +else + gnome-terminal $* --tab # doesn't work. gnome-terminal --tab --tab creates a window with two tabs +fi diff -Nru churpeau-1.7.4~saucy/README.md churpeau-1.7.9~saucy/README.md --- churpeau-1.7.4~saucy/README.md 2013-10-21 19:58:53.000000000 +0000 +++ churpeau-1.7.9~saucy/README.md 2014-04-20 16:56:38.000000000 +0000 @@ -1,9 +1,7 @@ Installation : ``` -sudo apt-get install -y python-software-properties && sudo add-apt-repository ppa:apt-fast/stable -sudo apt-add-repository ppa:christophe-hurpeau -sudo apt-get update +sudo apt-get install -y python-software-properties && sudo apt-add-repository ppa:christophe-hurpeau && sudo apt-get update ``` Packages : diff -Nru churpeau-1.7.4~saucy/scripts/git-statuses churpeau-1.7.9~saucy/scripts/git-statuses --- churpeau-1.7.4~saucy/scripts/git-statuses 1970-01-01 00:00:00.000000000 +0000 +++ churpeau-1.7.9~saucy/scripts/git-statuses 2014-04-21 15:29:15.000000000 +0000 @@ -0,0 +1,39 @@ +#!/bin/sh + +. /var/lib/christophe-hurpeau/ch-common.lib + +current=`pwd` + +if [ $# -eq 0 ]; then + ARGS="." +else + ARGS=$@ +fi; + +for i in $ARGS; do + for gitdir in `find $i -name .git`; do + dir=$(dirname $gitdir) + cd $current/$dir + #git fetch >/dev/null 2>&1 + warnings="" + status=`git status -s` + fullstatus=`git status` + `echo "$fullstatus" | grep -sq "Your branch is ahead"` + if [ $? = 0 ]; then + warnings="$warnings Unpushed" + fi + `echo "$fullstatus" | grep -sq "Your branch is behind"` + if [ $? = 0 ]; then # is behind + warnings="$warnings Unmerged" + fi + + if [ "$status" != "" ] || [ "$warnings" != "" ]; then + displayTitle "$dir" + if [ "$warnings" != "" ]; then + displayWarning $warnings + fi + echo "$status" + echo + fi + done +done diff -Nru churpeau-1.7.4~saucy/scripts/upgrade churpeau-1.7.9~saucy/scripts/upgrade --- churpeau-1.7.4~saucy/scripts/upgrade 2013-11-09 10:36:19.000000000 +0000 +++ churpeau-1.7.9~saucy/scripts/upgrade 2014-04-20 16:34:30.000000000 +0000 @@ -6,12 +6,12 @@ # sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove --purge && sudo apt-get autoclean which monit && service monit stop displayTitle "Updating" -apt-fast update -qq +apt-get update -qq displayTitle "Upgrading" -apt-fast dist-upgrade +apt-get dist-upgrade if [ $? = 0 ]; then displayTitle "Cleaning" - apt-fast autoremove --purge && apt-fast autoclean + apt-get autoremove --purge && apt-fast autoclean displayTitle "Updating pecl" which pecl && pecl upgrade-all displayTitle "Updating pear"