Move scripts dir inside hm
And remove weird path contraptions
This commit is contained in:
parent
050901da2f
commit
edeef96133
49 changed files with 2 additions and 11 deletions
27
hm/scripts/rep
Executable file
27
hm/scripts/rep
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash --pure
|
||||
#! nix-shell -p bash coreutils
|
||||
|
||||
# Moves a file to another place and put a symbolic link in place
|
||||
|
||||
function rep_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 "rep_$command" &> /dev/null; then
|
||||
"rep_$command" "$@"
|
||||
else
|
||||
rep_help
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue