Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 9a30daf

Browse files
committed
Bug fixes.
1 parent 72b77ac commit 9a30daf

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

commands/self-update

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,20 @@ then
3232
cat <<EOF > /tmp/self-update.$$
3333
cd ${WPLIB_BOX_CLI_DIR}
3434
echo "# WPLib-Box: Updating /opt/box with version ${VERSION}"
35-
sudo git clean -q -d -fx "" > /dev/null
36-
sudo git reset -q --hard ${VERSION} > /dev/null
37-
sudo git pull -q ${WPLIB_BOX_SCRIPTS_REPO} > /dev/null
38-
sudo git checkout -q ${VERSION} > /dev/null
35+
sudo git config --global user.email "user@wplib.com"
36+
sudo git config --global user.name "WPLib"
37+
sudo git clean -q -d -fx "" > /dev/null
38+
sudo git pull > /dev/null 2>&1
39+
sudo git checkout -q --force ${VERSION} > /dev/null
3940
echo $VERSION > /opt/box/version
4041
echo "Done"
41-
exec rm -f /tmp/self-update.$$
4242
EOF
4343
else
4444
cat <<EOF > /tmp/self-update.$$
4545
echo "# WPLib-Box: Initializing /opt/box with version ${VERSION}"
4646
sudo git clone -q ${WPLIB_BOX_SCRIPTS_REPO} ${WPLIB_BOX_CLI_DIR} > /dev/null
4747
echo $VERSION > /opt/box/version
4848
echo "Done"
49-
exec rm -f /tmp/self-update.$$
5049
EOF
5150
fi
5251

0 commit comments

Comments
 (0)