bin: lil improvements
This commit is contained in:
parent
f8fa6fb67e
commit
9cd3d2df9d
|
@ -506,7 +506,7 @@ fi
|
|||
|
||||
lowercase() {
|
||||
#$(which perl-rename || echo rename) -iv 'y/A-Z /a-z-/' "$@"
|
||||
find "$@" -exec sh -c 'mv -iv {} "$(echo {} | tr "A-Z " "a-z-" | sed "s|---|_|;s|\.-|.|")" 2>/dev/null' \;
|
||||
find "$@" -exec sh -c 'mv -iv "{}" "$(echo "{}" | tr "A-Z " "a-z-" | sed "s|---|_|;s|\.-|.|")" 2>/dev/null' \;
|
||||
}
|
||||
|
||||
# TODO replace cp by rsync, automatically use compression for remote transfers
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh -ex
|
||||
# Set exec flag on all files that should be executable
|
||||
find -maxdepth 4 -name "*.sh" "$@" -exec chmod +x {} +
|
|
@ -1,7 +1,4 @@
|
|||
#!/bin/bash
|
||||
git rev-parse @{upstream} >/dev/null 2>&1 ||
|
||||
git branch --set-upstream-to=@{push}
|
||||
git pull --rebase --autostash "$@" 2> >(head -4 >&2) ||
|
||||
{ test -e $(git rev-parse --git-path rebase-merge) &&
|
||||
printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 &&
|
||||
git rebase --abort; }
|
||||
git pull --rebase --autostash "$@" 2> >(head -4 >&2)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh
|
||||
git-l
|
||||
git-l ||
|
||||
{ test -e $(git rev-parse --git-path rebase-merge) &&
|
||||
printf "\e[31;1mError - aborting rebase!\e[0m\n" >&2 &&
|
||||
git rebase --abort; }
|
||||
if git rev-parse @{upstream} >/dev/null 2>&1
|
||||
then git push "$@"
|
||||
else git push --set-upstream "$@"
|
||||
|
|
Loading…
Reference in New Issue