Simple installation script
This commit is contained in:
@@ -30,3 +30,10 @@ git clone https://winklerfamilie.eu/git/efelon/shell_sequencer.git /opt/sequence
|
|||||||
ln -s /opt/sequencer/sequencer/sequencer.sh /usr/local/bin
|
ln -s /opt/sequencer/sequencer/sequencer.sh /usr/local/bin
|
||||||
ln -s /opt/sequencer/seqs /opt
|
ln -s /opt/sequencer/seqs /opt
|
||||||
```
|
```
|
||||||
|
or
|
||||||
|
|
||||||
|
use the simple bash installation script in the repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -L https://winklerfamilie.eu/git/efelon/shell_sequencer/raw/branch/master/install.sh | bash
|
||||||
|
```
|
||||||
|
44
install.sh
Executable file
44
install.sh
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SEQLOC="/opt"
|
||||||
|
SEQHOME="${SEQLOC}/sequencer"
|
||||||
|
SEQGITURL="https://winklerfamilie.eu/git/efelon/shell_sequencer.git"
|
||||||
|
|
||||||
|
if [ -d "$SEQHOME" ]; then
|
||||||
|
echo " [E] Sequencer seems to be installed already at:"
|
||||||
|
echo " $SEQHOME"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -w "$SEQLOC" ]; then
|
||||||
|
echo " [E] Your user has no permission to write to $SEQLOC"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
which git >>/dev/null 2>&1
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo " [W] Git not found and will be installed"
|
||||||
|
apt update
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo " [W] Cannot update apt repositories"
|
||||||
|
fi
|
||||||
|
apt install git -y
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo " [E] Cannot install git via apt"
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
git clone $SEQGITURL "$SEQHOME"
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo " [E] Error cloning git repository:"
|
||||||
|
echo " $SEQGITURL"
|
||||||
|
exit 6
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -s "${SEQHOME}/sequencer/sequencer.sh" "/usr/local/bin"
|
||||||
|
ln -s "${SEQHOME}/seqs" "/opt"
|
||||||
|
|
||||||
|
echo " [I] Successfully installed shell sequencer"
|
||||||
|
echo " Don't forget to set git user variables:"
|
||||||
|
echo " git config user.name=\"Your Name\""
|
||||||
|
echo " git config user.email=\"Your.Name@example.com\""
|
Reference in New Issue
Block a user