-
Notifications
You must be signed in to change notification settings - Fork 1
/
user_aliases.bash
62 lines (58 loc) · 1.17 KB
/
user_aliases.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
source "$HOME/.common_aliases.bash"
inst_modules_dir="$HOME/apps/perl/modules"
dc()
{
echo "It's cd - not dc dammit!" 1>&2
}
disable_local_lib()
{
unset MODULEBUILDRC PERL_MM_OPT
}
rpmbuild()
{
(
disable_local_lib
`which rpmbuild` "$@"
)
}
cp_mods()
{
touch "$@"
cp -i "$@" /home/music/Music/mp3s/Mods/
}
mv_flv()
{
touch "$@"
mv -i "$@" /home/music/Music/mp3s/
}
# What this function does is cache the result of a command in a file, and
# use the file to output the results in case it exists.
# Format is: cache "$basename_to_cache_in" $cmd $arg1 $arg2 $arg3...
cache()
{
local cache_fn="$1"
shift
local dir="${CACHE_DIR:-.}"
if ! test -d "$dir"; then
mkdir -p "$dir"
fi
local fn="$dir/$cache_fn"
if ! test -f "$fn" ; then
"$@" > "$fn"
fi
cat "$fn"
}
_update_PERL5LIB()
{
. ~/conf/trunk/shlomif-settings/bash-aliases/PERL5LIB_gen.sh
}
_update_PERL5LIB
alias myrsync='rsync -a --progress -v --inplace' \
rem_up='HOMEPAGE_SSH_PATH="$__HOMEPAGE_REMOTE_PATH" make upload' \
xz9='xz -9 --extreme' ifconfig='/sbin/ifconfig'
rexz9()
{
local fn="$1"
unxz "$fn"
xz9 "${fn%.xz}"
}