setup/clone/utility/install-source

26 lines
752 B
Plaintext
Raw Normal View History

2017-01-26 14:40:45 +00:00
#!/bin/sh
# [1] First install only
#========================================================#
if [ -e /home/sats/satsd/first_install ]; then
dpkg -s git 2>/dev/null >/dev/null && gitinstalled=1 || gitinstalled=0;
# (1) With git if installed #
if [ $gitinstalled -eq 1 ]; then
git clone ssh://smmp-server/satsd/git /home/sats/satsd/source \
&& rm /home/sats/satsd/first_install \
|| exit;
# (2) Without git installed #
else
# temporary replacement (without git)
scp -r smmp-server:/satsd/scp/source /home/sats/satsd/ \
&& rm /home/sats/satsd/first_install \
|| exit;
fi;
fi;