cccccache !

This commit is contained in:
Geoffrey Frogeye 2017-04-22 18:04:17 +02:00
parent ec3b18f34c
commit a5a3ae373c
3 changed files with 52 additions and 6 deletions

9
bashrc
View file

@ -15,10 +15,9 @@ export VISUAL=vim
export BROWSER=qutebrowser export BROWSER=qutebrowser
# Some programs need those changes # Some programs need those changes
if [ -d $HOME/.gem/ruby ]; then export PATH="/usr/lib/ccache/bin/:$PATH"
ls $HOME/.gem/ruby | while read rubyVer; do if [ -d $HOME/.gem/ruby/2.4.0/bin ]; then
export PATH="$PATH:$HOME/.gem/ruby/$rubyVer/bin/" export PATH="$HOME/.gem/ruby/2.4.0/bin/:$PATH"
done
fi fi
#export PATH="$(echo "$PATH" | sed 's|:|\n|g' | sort | uniq | tr '\n' ':' | sed 's|:$||')" #export PATH="$(echo "$PATH" | sed 's|:|\n|g' | sort | uniq | tr '\n' ':' | sed 's|:$||')"
export JAVA_FONTS=/usr/share/fonts/TTF export JAVA_FONTS=/usr/share/fonts/TTF
@ -29,7 +28,7 @@ export XDG_CONFIG_HOME=$HOME/.config
# ALIASES # ALIASES
# Completion for existing commands # Completion for existing commands
export LS_OPTIONS='--group-directories-first --time-style=+"%d/%m/%Y %H:%M" --color=auto --classify --human-readable' export LS_OPTIONS='--group-directories-first --time-style=+"%d/%m/%Y %H:%M:%S" --color=auto --classify --human-readable'
alias ls="ls $LS_OPTIONS" alias ls="ls $LS_OPTIONS"
alias grep='grep --color=tty -d skip' alias grep='grep --color=tty -d skip'
alias mkdir='mkdir -v' alias mkdir='mkdir -v'

View file

@ -1,7 +1,7 @@
# Beware! This file is rewritten by htop when settings are changed in the interface. # Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly. # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1 fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46 sort_key=47
sort_direction=1 sort_direction=1
hide_threads=0 hide_threads=0
hide_kernel_threads=0 hide_kernel_threads=0

47
scripts/sedrename Executable file
View file

@ -0,0 +1,47 @@
#!/usr/bin/env bash
# Rename a list of files with a sed pattern
usage() {
echo "Usage: $0 PATTERN [-d] < filelist"
echo
echo "Arguments:"
echo " PATTERN Sed pattern to apply"
echo
echo "Options:"
echo " -d Dry run"
exit 1
}
if [[ -z "$1" ]]; then
usage
fi
pattern="$1"
dry=1
if [[ -n "$2" ]]; then
if [[ "$2" = '-d' ]]; then
dry=0
else
usage
fi
fi
while read src
do
dst="$(echo "$src" | sed "$pattern")"
if [[ $? != 0 ]]; then
echo "ERREUR Invalid sed pattern"
exit 2
fi
if [[ $dry == 0 ]]; then
echo "$src" → "$dst"
else
mv "$src" "$dst"
fi
done