diff --git a/utils.sh b/utils.sh index 4bfb0df..67681c8 100644 --- a/utils.sh +++ b/utils.sh @@ -1,15 +1,13 @@ #! /usr/bin/env sh -MAIN_DIR="/home/istvan/progs/utils" - -export PATH="$PATH:$MAIN_DIR/bin" -export PYTHONPATH="$PYTHONPATH:$MAIN_DIR" +UTILS_DIR="/home/istvan/progs/utils" export CDPATH=.:~:~/progs:/mnt/bozso_i -alias sbrc='source ~/.bashrc' +alias reload='source $UTILS_DIR/utils.sh' alias gs_stat='git status' + function update_clean { sudo apt-get update sudo apt-get upgrade @@ -19,6 +17,7 @@ function update_clean { sudo apt-get autoremove } + function extract_music { IFS=$'\n' for zipfile in $(ls /tmp/*.zip); do @@ -75,3 +74,52 @@ function gs_radd { function gs_pull { git pull origin master } + + +function local_install { + if [[ $# -ne 1 ]]; then + echoerr "error: local_install: One argument (package name) is required!" + return 1 + fi + + rm *.deb + + apt download $1 + mkdir -p $PROOT + + dpkg -x *.deb $PROOT + + rm *.deb +} + + +alias attach="tmux attach -t" +alias nano="nano -u" +alias nbrc="nano -u ~/.bashrc" + + +PROGS="/home/istvan/progs" + +source "$PROGS/insar_meteo/insar_meteo.sh" + + +JULIA="$PROGS/julia-1.1.0/bin" +SNAP="/home/istvan/snap/bin" +SSARA="$PROGS/SSARA" + +PATH="$PATH:$JULIA:$SNAP:$SSARA:$PROGS:$PROOT/usr/bin/:$UTILS_DIR/bin" + +export PYTHONPATH="$PYTHONPATH:$UTILS_DIR" + +export PROOT="/home/istvan/packages" + +export OMP_NUM_THREADS=8 + +export LD_LIBRARY_PATH="$PROOT/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" + +export HOMEBREW_PREFIX="/home/istvan/.linuxbrew" +export HOMEBREW_CELLAR="/home/istvan/.linuxbrew/Cellar" +export HOMEBREW_REPOSITORY="/home/istvan/.linuxbrew/Homebrew" +export PATH="/home/istvan/.linuxbrew/bin:/home/istvan/.linuxbrew/sbin:$PATH" +export MANPATH="/home/istvan/.linuxbrew/share/man:$MANPATH" +export INFOPATH="/home/istvan/.linuxbrew/share/info:$INFOPATH"