26 lines
418 B
Bash
Executable file
26 lines
418 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Moves a file to another place and put a symbolic link in place
|
|
|
|
function proxy_help {
|
|
echo "Usage: $0 SOURCE DEST"
|
|
echo
|
|
echo "Arguments:"
|
|
echo " SOURCE File to be moved"
|
|
echo " DEST Where to be moved"
|
|
return 0
|
|
}
|
|
|
|
mv "$1" "$2"
|
|
ln -s "$2" "$1"
|
|
|
|
# MAIN
|
|
command="$1"
|
|
shift
|
|
if type "proxy_$command" &> /dev/null; then
|
|
"proxy_$command" "$@"
|
|
else
|
|
proxy_help
|
|
fi
|
|
|