14 lines
281 B
Bash
Executable file
14 lines
281 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
IFS=$'\n'
|
|
|
|
cd ~git
|
|
source git-shell-commands/util.sh
|
|
arguments 2 "$#"
|
|
|
|
origin="$(repo_name_existing "$1")"
|
|
dest="$(repo_name_new "$2")"
|
|
|
|
mv -T "$origin" "$dest"
|
|
ln -T -s "$dest" "$origin"
|
|
printf '%s\n' "Moved and created symlink '$origin' -> '$dest'"
|