dot

packages and services management
Log | Files | Refs | README

commit e3a0385428243831ade45bc06873eab853643178
parent 088004a2a44be880ac63f7f90d0276a89470adf1
Author: josuah <mail@josuah.net>
Date:   Mon, 12 Sep 2016 16:53:49 -0400

Much lighter.

Diffstat:
MREADME | 2+-
Abin/fdiff | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dbin/lsync | 114-------------------------------------------------------------------------------
Dbyacc/build.sh | 3---
Dgirara/build.sh | 12------------
Minstall.sh | 3+--
Dreflex/build.sh | 10----------
Dretawq/.retawq/config | 69---------------------------------------------------------------------
Dretawq/build.sh | 10----------
Mshell/.profile | 7+------
Mvim/.vimrc | 1-
Dyasm/build.sh | 4----
Dzathura/.config/zathura/zathurarc | 9---------
Dzathura/build.sh | 8--------
14 files changed, 82 insertions(+), 249 deletions(-)

diff --git a/README b/README @@ -42,7 +42,7 @@ SHELL SCRIPTS piano Terminal piano! Dvorak layout by default. |TT|TTT|TT|TTT| -VIM PLUGINS +VIM -------------------------------------------------------------------------------- syntastic http://github.com/scrooloose/syntastic diff --git a/bin/fdiff b/bin/fdiff @@ -0,0 +1,79 @@ +# ____ /\ __ ____ ____ +# .' ___\ ___/ / \/ .' ___\.' ___\ +# / .'_ .'__ / /\ / .'_ / .'_ +# / ___/ / /_/ / / // ___/ / ___/ +# \/ \____/ \/ \/ \/ - Diff the file content of two directories +#=============================================================================== + +help=' +NAME + FDiff - Show a diff of the file content of two directories + +SYNTAX + fdiff [-e PATTERN] DIR1 DIR2 + +OPTIONS + -e Exclude PATTERN from search, matching the whole path. + DIR The two directories to mirror. +' + +[ $# -lt 2 ] && printf '%s\n\n' "$help" && exit 0 + +while [ $# -gt 0 ] +do + case "$1" in + '-e' ) e="$2"; shift ;; + '-'* ) printf '%s\n\n' "$help"; exit 0 ;; + * ) [ -z "$d1" ] && d1="${1%/}" || d2="${1%/}" ;; + esac + shift +done + +impaired=0 different=0 directories=0 identical=0 + +# Generate a path list for all the files from both directories +{ + find "$d1/" -mindepth 1 ! -path "$e" | cut -c $((${#d1} + 2))- + find "$d2/" -mindepth 1 ! -path "$e" | cut -c $((${#d2} + 2))- +} | sort -u | { + + while read -r path + do + if [ -d "$d1/$path" ] || [ -d "$d2/$path" ] + then + directories=$(($directories + 1)) + printf ': :\033[1;30m' + + elif [ ! -e "$d2/$path" ] + then + impaired=$(($impaired + 1)) + printf ': \033[32;1m>\033[0m :' + + elif [ ! -e "$d1/$path" ] + then + impaired=$(($impaired + 1)) + printf ': \033[32;1m<\033[0m :' + + elif cmp "$d2/$path" "$d1/$path" + then + identical=$(($identical + 1)) + printf ': \033[36;1m=\033[0m :' + + else + different=$(($different + 1)) + printf ': \033[31;1m!\033[0m :' + fi + + unset b + printf ' %s\033[0m\n' "$path" + done + + printf ' \ \ %-40s \033[1;30m%5s directories\033[0m + \ \__ %-40s \033[1;32m%5s\033[0m impaired + \_____ %-40s \033[1;36m%5s\033[0m identical + %-40s \033[1;31m%5s\033[0m different\n' \ + '' "$directories" \ + "$d1" "$impaired" \ + "$d2" "$identical" \ + '' "$different" +} diff --git a/bin/lsync b/bin/lsync @@ -1,114 +0,0 @@ -#!/bin/sh -# /\ -# / / ____ __ /\ ____ ____ -# / / / __// / / // __ \ / ___\ -# / /__\ \ \ \/ // / / // /__ -# \/ \___/ __\ / \/ \/ \____\ - Sync from two local dirs -#==========\__,'================================================================ - -help=' -NAME - LSync - Mirror two local dirs keeping the latest version - -SYNTAX - lsync [-v] [-e PATTERN] DIR1 ['RULE'] DIR2 - -OPTIONS - -e Exclude PATTERN from search, matching the whole path. - -v View the output without copying anything. - DIR The two directories to mirror. - RULE Rule to determine in which operation to perform. - > and < only copy, - >> and << copy and overwrite, - >>> and <<< only overwrite, - none means everything. - -USAGE - LSync mirrors data across two directories so that both contains all the - files from each other keeping the timestapms. - - When a file exists in both directories, if they do not have the same - timestamps, the most recent file overwrite the other. - - There is no deletion performed.' - -[ $# -lt 2 ] && printf '%s\n\n' "$help" && exit 0 - -while [ $# -gt 0 ] -do case "$1" in - '-e' ) e="$2"; shift ;; - '-v' ) v=1 ;; - '>' | '>>' | '>>>' | '<<<' | '<<' | '<' ) r="$1" ;; - '-'* ) printf '%s\n\n' "$help"; exit 0 ;; - * ) [ -z "$d1" ] && d1="${1%/}" || d2="${1%/}" ;; - esac - shift -done - -[ ! -d "$d1" ] && mkdir -p "$d1" -[ ! -d "$d2" ] && mkdir -p "$d2" - -copied=0; overwritten=0; directories=0; identical=0 - -# Generate a path list for all the files from both directories -{ - find "$d1" | cut -c $((${#d1} + 1))- - find "$d2" | cut -c $((${#d2} + 1))- -} | sort -u | { - [ -z "$e" ] && tee || grep -v "$e" -} | { - while read -r path - do - # Create directories - if [ -d "$d1/$path" ] || [ -d "$d2/$path" ] - then [ -z "$v" ] && mkdir -p "$d1/$path" "$d2/$path" - printf '\033[1;30m ' - directories=$(($directories + 1)) - - # Copy files that does not exist on one side - elif [ ! -e "$d2/$path" ] - then if [ "$r" = '>' -o "$r" = '>>' -o -z "$r" ] - then b=';1' copied=$(($copied + 1)) - [ -z "$v" ] && cp -p "$d1/$path" "$d2/$path" - fi - printf '\033[32%sm1 > 2\033[0%sm' "$b" "$b" - - elif [ ! -e "$d1/$path" ] - then if [ "$r" = '<' -o "$r" = '<<' -o -z "$r" ] - then b=';1' copied=$(($copied + 1)) - [ -z "$v" ] && cp -p "$d2/$path" "$d1/$path" - fi - printf '\033[32%sm1 < 2\033[0%sm' "$b" "$b" - - # Overwrite files keeping the latest version - elif [ "$d1/$path" -nt "$d2/$path" ] - then if [ "$r" = '>>>' -o "$r" = '>>' -o -z "$r" ] - then b=';1' overwritten=$(($overwritten + 1)) - [ -z "$v" ] && cp -pf "$d1/$path" "$d2/$path" - fi - printf '\033[31%sm1>>>2\033[0%sm' "$b" "$b" - - elif [ "$d2/$path" -nt "$d1/$path" ] - then if [ "$r" = '<<<' -o "$r" = '<<' -o -z "$r" ] - then b=';1' overwritten=$(($overwritten + 1)) - [ -z "$v" ] && cp -pf "$d2/$path" "$d1/$path" - fi - printf '\033[31%sm1<<<2\033[0%sm' "$b" "$b" - - else identical=$(($identical + 1)) - printf '1 = 2' - fi - - unset b - printf ' %s\033[0m\n' "$path" - done - - printf ' \ \ %-40s \033[1;32m%5s\033[0m copied - \ \__ %-40s \033[1;31m%5s\033[0m overwritten - \_____ %-40s \033[1;39m%5s\033[0m identical - %-40s \033[1;30m%5s\033[0m directories\n' \ - '' "$copied" \ - "$d2" "$overwritten" \ - "$d1" "$identical" \ - '' "$directories" -} diff --git a/byacc/build.sh b/byacc/build.sh @@ -1,2 +0,0 @@ -# Berkeley YACC implementation -tar=http://invisible-island.net/datafiles/release/byacc.tar.gz- \ No newline at end of file diff --git a/girara/build.sh b/girara/build.sh @@ -1,12 +0,0 @@ -# Graphical interface library used by zathura - -tar=http://pwmt.org/projects/girara/download/girara-0.2.6.tar.gz - -build() -{ - make \ - LIBDIR="$PREFIX/lib" \ - INCLUDEDIR="$PREFIX/include" \ - PREFIX="$PREFIX" \ - install -} diff --git a/install.sh b/install.sh @@ -59,8 +59,7 @@ case "$1" in mkdir -p "$b" ~/.vim/autoload wget -qO ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim - sed '/^[ \t-]*$/ d; 1,/^VIM$/ d; /^PROJECTS$/,$ d' "$pwd/README" \ - | while read p + for p in $(sed '/^[ \t-]*$/ d; 1,/^VIM/ d; /^PROJ/,$ d' "$pwd/README") do wget -qO- "${p##* }/archive/master.tar.gz" | tar -xvz -f- -C "$b" & done diff --git a/reflex/build.sh b/reflex/build.sh @@ -1,10 +0,0 @@ -# lex implementation -tar=http://invisible-island.net/datafiles/release/reflex.tar.gz - -build() -{ - ./configure --prefix="$PREFIX" - make - make install - ln -s reflex ../bin/flex -} diff --git a/retawq/.retawq/config b/retawq/.retawq/config @@ -1,69 +0,0 @@ -# /\ -# _____ ___ / /_ _____ __ /\ _____ -# / ____\.'__ \ / ___\.'__ // /\/ /.'__ / -# / / / ____// / / /_/ // / / // /_/ / -# \/ \___\ \/ \____/ \____/ \__ / - simple text mode web browser -# \/ -#===[ USER INTERFACE ]========================================================= - -# A bookmarks document; we use a local file: -bookmarks local:~/bookmarks.html - -# Black-on-white colors: -#colors reverse - -# Don't be asked for confirmation of certain "dangerous" commands: -#dont-confirm quit close overwrite form-submit - -# Our home page: -home http://duckduckgo.com/html - -# URL _pattern_ for a search engine with the search string within the URL -jumps - s http://duckduckgo.com/html?q=!1 !1 - -# Command actions keymap -#keymap command -# Q quit -# l line-down -# r document-reload -# home document-top -# cursor-left view-back - -# Input mode actions keymap -#keymap line-input -# cursor-left to-left -# cursor-up to-start -# ctrl-a area-switch - -# Our favorite search engine: -search-engine http://duckduckgo.com/ - -# Set the terminal window title -termwintitle 1 - -#===[ TECHNICAL ]=============================================================== - -# HTTP cookies -#http-cookies -# allow foo.org # we need cookies for an important service on this server -# deny * # deny everything else (rule superfluous - retawq's default) - -# OR: we love cookies and want'em all (deprecated) -http-cookies - allow * - -# When downloading something from an HTTP server, we prefer the French -# language, but would also accept English; note that there must not be -# whitespace between the single languages. -languages en,fr - -# default server for "news:" and "nntp:" URLs -news-server-default news.gmane.org - -# Maximum number of automatic redirections; we need to access a completely -# screwed server which requires more than 10 redirections. -redirections 30 - -# Tell HTTP servers about our operating system -user-agent 1 diff --git a/retawq/build.sh b/retawq/build.sh @@ -1,9 +0,0 @@ -# Small text-mode web browser - -tar=http://prdownloads.sourceforge.net/retawq/retawq-0.2.6c.tar.gz - -build() -{ - ./configure --enable-local-cgi --set-tls=2 --path-prefix="$PREFIX" - make && make install -}- \ No newline at end of file diff --git a/shell/.profile b/shell/.profile @@ -89,7 +89,7 @@ ps1() printf '\n' # Line separator - local p='────────────────────────────────────────' + local p='----------------------------------------' printf '\033[30;1m%s\033[0m\r' "$p$p" # Date @@ -245,9 +245,4 @@ if [ "$TERM" = 'linux' ] then printf "$coal" # Theme printf '\033[?6;c' # Cursor style - setfont Uni2-VGA16.psf # Font fi - - -# STARTUP -#------------------------------------------------------------------------------- diff --git a/vim/.vimrc b/vim/.vimrc @@ -14,7 +14,6 @@ set laststatus=2 ruler " Statusline set smartcase ignorecase " Case set hlsearch showmatch " Highlight set list listchars=tab::\ ,trail:.,nbsp:.,extends:>,precedes:< " Listchars -set fillchars=vert:│,fold:─ " Fillchars set ruler number numberwidth=4 cursorline nowrap " Interface set backupdir=~/.cache/vim// set directory=~/.cache/vim// diff --git a/yasm/build.sh b/yasm/build.sh @@ -1,3 +0,0 @@ -# Assembler/desassembler, rewrite of NASM - -tar=http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz- \ No newline at end of file diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc @@ -1,9 +0,0 @@ -# /\ /\ -# ______ _____ / /_ / /_ __ /\ _____ _____ -# /__ /.'__ // ___\/ __ \ / / / // ____\.'__ / -# ,-' _-'/ /_/ // / / / / // /_/ // / / /_/ / -# /_____\ \____/ \/ \/ \/ \____/ \/ \____/ - Hard to compile with `src`! -#=============================================================================== - -set recolor true -set recolor-keephue true diff --git a/zathura/build.sh b/zathura/build.sh @@ -1,8 +0,0 @@ -# Document viewer with minimal interface - -tar=https://pwmt.org/projects/zathura/download/zathura-0.3.6.tar.gz - -build() -{ - make PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig/" PREFIX="$PREFIX" install -}