Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ if [[ -z "$DBOX_SKIP_UPDATE" ]]; then
if [ ! -z "${Latest}" ] && [ ! -z "${Current}" ] && [ $Current != $Latest ]; then
echo "Downloading Dropbox v$Latest..."
tmpdir=`mktemp -d`
curl -# -L $DL | tar xzf - -C $tmpdir
echo "Installing new version..."
rm -rf /opt/dropbox/*
mv $tmpdir/.dropbox-dist/* /opt/dropbox/
rm -rf $tmpdir
echo "Dropbox updated to v$Latest"
(curl -# -L $DL | tar xzf - -C $tmpdir) || rm -rf $tmpdir
if [ -d $tmpdir ]; then
echo "Installing new version..."
rm -rf /opt/dropbox/*
mv $tmpdir/.dropbox-dist/* /opt/dropbox/
rm -rf $tmpdir
echo "Dropbox updated to v$Latest"
else
echo "Download failed"
fi
else
echo "Dropbox is up-to-date"
fi
Expand Down