diff options
author | Karel Kočí <cynerd@email.cz> | 2017-10-22 22:18:02 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-10-22 22:18:02 +0200 |
commit | b5d63999c82eb89c0bd671c2ae04b936b6ec714d (patch) | |
tree | 4f5a11ea1f35393a95d918f5f5812414e47353ab | |
parent | 97ccd8d036996684d1ba6acf56bda61c7e184090 (diff) | |
parent | 8cf55e56aeb59c076c26e3bd4636bbf82bb1eeb5 (diff) | |
download | myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.tar.gz myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.tar.bz2 myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.zip |
Merge branch 'master' into server
-rw-r--r-- | bashrc | 2 | ||||
-rwxr-xr-x | install | 4 | ||||
-rw-r--r-- | shellrc | 15 | ||||
-rw-r--r-- | utils/arch | 23 | ||||
-rw-r--r-- | utils/inst | 1 | ||||
-rwxr-xr-x | utils/install_pacaur | 35 | ||||
-rw-r--r-- | zshrc | 2 |
7 files changed, 9 insertions, 73 deletions
@@ -30,7 +30,7 @@ function settitle { echo -ne "\033]0;`whoami`@`hostname`:`pwd`\007" } case "$TERM" in - xterm*|*rxvt*) + xterm*|*rxvt*|*st*) trap 'settitle' DEBUG ;; esac @@ -11,10 +11,6 @@ git submodule update --init --recursive || (echo "Submodule update failed!"; exi [ "$1" = "-f" ] && FORCE=true || FORCE=false ################################################################################# -if [ -e /etc/arch-release ] && ask "Archlinux software"; then - source utils/arch - archlinux_inst -fi if ask "Install Bashrc"; then inst bashrc ~/.bashrc @@ -7,14 +7,11 @@ ################################################################################# # Aliases -if [ "$(uname -s)" = "FreeBSD" ]; then - alias ls='ls -G' -else - alias ls='ls --color=auto' - eval $(dircolors -b) - alias make="make -j$(nproc)" -fi +alias ls='ls --color=auto' +eval $(dircolors -b) alias ll='ls -lh' +alias df='df -h' +alias du='du -h' alias grep='grep --color=auto' alias git='LANG=en_GB git' alias gdb='gdb -q' @@ -51,8 +48,8 @@ fi # Generate random password (optionally takes length of password as first argument) genpasswd() { local l=$1 - if [ "$l" = "" ]; then l=16; fi - tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs + [ -n "$l" ] || l=16 + tr -dc A-Za-z0-9_ < /dev/urandom | head -c "$l" | xargs } # Run given command every second diff --git a/utils/arch b/utils/arch deleted file mode 100644 index ccf1133..0000000 --- a/utils/arch +++ /dev/null @@ -1,23 +0,0 @@ -# Archlinux system installation and compare -# vim: ft=sh - -archlinux_inst() { - # Check if we are on archlinux - if ! [ -e /etc/arch-release ]; then - echo Archlinux not detected! >&2 - return - fi - # Now check for pacaur and optionally install - if ! pacaur --version 2>&1 >/dev/null; then - echo Please install pacaur! >&2 - return - fi - - TFILE1=$(mktemp myconfigs-pacaur1-XXXXX) - m4 archlinux.pkgs -I archlinux.pkgs.d | grep -E '^[^ ]+$' | sort | uniq > "$TFILE1" - TFILE2=$(mktemp myconfigs-pacaur2-XXXXX) - pacaur -Qqe | sort > "$TFILE2" - echo " Required Local" - diff --suppress-common-lines -ay "$TFILE1" "$TFILE2" - rm "$TFILE1" "$TFILE2" -} @@ -102,6 +102,7 @@ checkdiff() { doinst() { echo -e "\e[1;34mrsync -rlpt $1 $2\e[0m" + mkdir -p "$(dirname "$2")" rsync -rlpt $1 $2 # Now edit all .git files in target directory for g in `find "$1" -name '.git' -type f`; do diff --git a/utils/install_pacaur b/utils/install_pacaur deleted file mode 100755 index 0cabd46..0000000 --- a/utils/install_pacaur +++ /dev/null @@ -1,35 +0,0 @@ -# vim: ft=sh - -# Installs pacaur -# This expect base and base-devel to be installed -set -e - -if pacaur --version 2>&1 1>/dev/null; then - echo "Pacaur seems to be installed already" - exit 0 -fi - -# Make sure that we have wget -sudo pacman --needed -S wget -# Download pacaur tar -wget https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz -# Download cower (pacaur dependency) -wget https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz - -# Receive cower gpg key -gpg --keyserver pgp.mit.edu --recv-keys 1EB2638FF56C0C53 - -# Install cower -tar -xzf cower.tar.gz -cd cower -makepkg -Acis -cd .. -rm -rf cower cower.tar.gz -# Install pacaur -tar -xzf pacaur.tar.gz -cd pacaur -makepkg -Acis -cd .. -rm -rf pacaur pacaur.tar.gz -# Set cower to be just an dependency -pacman -D --asdeps cower @@ -87,7 +87,7 @@ add-zsh-hook preexec lrbell_begin add-zsh-hook precmd lrbell_end ################################################################ case "$TERM" in - xterm*|*rxvt*) + xterm*|*rxvt*|*st*) precmd() { print -Pn "\e]0;%n@%m:%~ %(1j,%j job%(2j|s|) ,)\a" } |