forked from evertiro/cdm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
474dc28
commit ab6bb3a
Showing
1 changed file
with
16 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
if [ "$(id -u)" != "0" ]; then | ||
echo "This script must be run as root!" | ||
exit 1 | ||
if which amixer >/dev/null | ||
then | ||
if [ "$(id -u)" != "0" ] | ||
then | ||
echo "This script must be run as root!" | ||
exit 1 | ||
else | ||
cd src | ||
install -m755 sldm /usr/bin/ | ||
install -Dm644 sldmrc /etc/sldmrc | ||
install -Dm755 zzz-sldm-profile.sh /etc/profile.d/zzz-sldm-profile.sh | ||
fi | ||
else | ||
cd src | ||
install -m755 sldm /usr/bin/ | ||
install -Dm644 sldmrc /etc/sldmrc | ||
install -Dm755 zzz-sldm-profile.sh /etc/profile.d/zzz-sldm-profile.sh | ||
echo "sldm requires slmenu to work. Please install slmenu (https://bitbucket.org/rafaelgg/slmenu)" | ||
exit 1 | ||
fi | ||
|