bin: lil improvements
This commit is contained in:
parent
f8fa6fb67e
commit
9cd3d2df9d
|
@ -506,7 +506,7 @@ fi
|
||||||
|
|
||||||
lowercase() {
|
lowercase() {
|
||||||
#$(which perl-rename || echo rename) -iv 'y/A-Z /a-z-/' "$@"
|
#$(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
|
# 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
|
#!/bin/bash
|
||||||
git rev-parse @{upstream} >/dev/null 2>&1 ||
|
git rev-parse @{upstream} >/dev/null 2>&1 ||
|
||||||
git branch --set-upstream-to=@{push}
|
git branch --set-upstream-to=@{push}
|
||||||
git pull --rebase --autostash "$@" 2> >(head -4 >&2) ||
|
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; }
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/sh
|
#!/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
|
if git rev-parse @{upstream} >/dev/null 2>&1
|
||||||
then git push "$@"
|
then git push "$@"
|
||||||
else git push --set-upstream "$@"
|
else git push --set-upstream "$@"
|
||||||
|
|
Loading…
Reference in New Issue