refactor: use bubble instead
This commit is contained in:
17
image/overlay/daemon/update-keys.sh
Executable file
17
image/overlay/daemon/update-keys.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# VARIABLES: _REVISION_ _REPO_
|
||||
|
||||
set -euo pipefail
|
||||
mkdir -p /users && chown keeper /users && chmod 644 /users
|
||||
|
||||
su keeper
|
||||
|
||||
init_repo(){
|
||||
git clone -b _REVISION_ _REPO_ /users
|
||||
}
|
||||
|
||||
if [[ ! -d /users/.git ]]; then
|
||||
init_repo
|
||||
elif [[ -d /users && cd /users && ! git pull origin _REVISION_ ]]; then
|
||||
init_repo
|
||||
fi
|
||||
Reference in New Issue
Block a user