cb0a9bdb0c
helpers for 'rm': lock, unlock helpers for 'trash': list-trash, undelete common functions updated with local settings for ADCs as well
17 lines
393 B
Bash
Executable file
17 lines
393 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. $(dirname $0)/adc.common-functions
|
|
|
|
repo=$1
|
|
[ -z "$1" ] && die need a repo name
|
|
|
|
owner=
|
|
owner=`cat $TRASH_CAN/$repo/gl-creater 2>/dev/null`
|
|
[ "$owner" = "$GL_USER" ] || die "$repo is not yours!"
|
|
|
|
cd $TRASH_CAN
|
|
realrepo=`dirname $repo`
|
|
[ -d $GL_REPO_BASE_ABS/$realrepo.git ] && die $realrepo already exists
|
|
mv $repo $GL_REPO_BASE_ABS/$realrepo.git
|
|
echo $repo restored to $realrepo
|