mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Improved dropbox management
This commit is contained in:
22
scripts/dropbox/install-control-script.bash
Normal file
22
scripts/dropbox/install-control-script.bash
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
# https://www.dropbox.com/install-linux
|
||||||
|
|
||||||
|
[[ ${DEBUG} ]] && set -o xtrace
|
||||||
|
|
||||||
|
DROPBOX_retries=3
|
||||||
|
DROPBOX_script_download_path="/tmp/dropbox.py"
|
||||||
|
DROPBOX_script_installation_path="/usr/local/bin/dropbox"
|
||||||
|
DROPBOX_script_url="https://www.dropbox.com/download?dl=packages/dropbox.py"
|
||||||
|
|
||||||
|
echo " downloading script…"
|
||||||
|
curl $DROPBOX_script_url \
|
||||||
|
--continue-at - \
|
||||||
|
--location \
|
||||||
|
--output $DROPBOX_script_download_path \
|
||||||
|
--retry $DROPBOX_retries \
|
||||||
|
--silent --show-error
|
||||||
|
|
||||||
|
echo " installing script…"
|
||||||
|
sudo install $DROPBOX_script_download_path $DROPBOX_script_installation_path
|
||||||
|
|
||||||
|
[[ ${DEBUG} ]] && set +o xtrace
|
||||||
@@ -1,20 +1,31 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
function dropbox-install {
|
function dropbox-install {
|
||||||
export DROPBOX_archive="dropbox_daemon.tar.gz"
|
# https://www.dropbox.com/install-linux
|
||||||
export DROPBOX_retries="3"
|
[[ ${DEBUG} ]] && set -o xtrace
|
||||||
export DROPBOX_url="http://www.getdropbox.com/download?plat=lnx.x86_64"
|
|
||||||
|
DROPBOX_archive="/tmp/dropbox_daemon.tar.gz"
|
||||||
|
DROPBOX_retries="3"
|
||||||
|
DROPBOX_url="http://www.getdropbox.com/download?plat=lnx.x86_64"
|
||||||
|
|
||||||
# download daemon
|
# download daemon
|
||||||
echo " downloading archive…"
|
echo " downloading archive…"
|
||||||
curl -C - -o $DROPBOX_archive --retry $DROPBOX_retries -S -L $DROPBOX_url
|
curl $DROPBOX_url \
|
||||||
|
--continue-at - \
|
||||||
|
--location \
|
||||||
|
--output $DROPBOX_archive \
|
||||||
|
--retry $DROPBOX_retries \
|
||||||
|
--silent --show-error
|
||||||
|
|
||||||
# install daemon
|
# install daemon
|
||||||
|
[[ -d "${HOME}/.dropbox-dist" ]] && echo " removing old executables…" && rm -r "${HOME}/.dropbox-dist"
|
||||||
echo " unarchiving tarball…"
|
echo " unarchiving tarball…"
|
||||||
tar zxf $DROPBOX_archive -C $HOME
|
tar zxf $DROPBOX_archive -C $HOME
|
||||||
|
|
||||||
# cleaning
|
# cleaning
|
||||||
rm $DROPBOX_archive
|
rm $DROPBOX_archive
|
||||||
|
|
||||||
|
[[ ${DEBUG} ]] && set +o xtrace
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -f start-multiple-instances.sh ]
|
if [ ! -f start-multiple-instances.sh ]
|
||||||
|
|||||||
Reference in New Issue
Block a user