Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README.md update, new install method
- Loading branch information
1 parent
d3f8bd4
commit bc4d855
Showing
2 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
############################################################################### | ||
# This file is part of amake | ||
# | ||
# Author: Pavel Milanes (Amateur Radio Operator CO7WT) | ||
# pavelmc@gmail.com | ||
# https://github.com/pavelmc/amake | ||
# | ||
# Goal: copy the amake script to /usr/loca/bin/ and give correct permissions | ||
# | ||
############################################################################### | ||
|
||
|
||
# Detect sudo and try | ||
SUDO=`which sudo` | ||
if [ -n "$SUDO" ] ; then | ||
echo "Installing amake script, you will be asked for a password, please give it." | ||
$SUDO cp amake /usr/local/bin | ||
$SUDO chmod +x /usr/local/bin/amake | ||
$SUDO chown root.root /usr/local/bin/amake | ||
|
||
echo "Done." | ||
exit 0 | ||
fi | ||
|
||
|
||
# If no sudo, try su | ||
SU=`which su` | ||
if [ -n "$SU" ] ; then | ||
echo "Installing amake script, you will be asked for root password, please give it." | ||
$SU -c "cp amake /usr/local/bin && chmod +x /usr/local/bin/amake && chown root.root /usr/local/bin/amake" root | ||
|
||
echo "Done." | ||
exit 0 | ||
fi | ||
|
||
|
||
# No sudo nor su..... hum... | ||
echo "Can't detect sudo or su executable to do the job." | ||
echo "You need to move the amake file to directory on the PATH variable and" | ||
echo "make it executable." |