mirror of
https://github.com/scopatz/nanorc
synced 2024-11-22 08:35:39 +01:00
Merge pull request #232 from SuperSandro2000/patch-1
Remove useless checks, formatting
This commit is contained in:
commit
907b2e3261
18
install.sh
18
install.sh
@ -8,10 +8,7 @@ fi
|
|||||||
|
|
||||||
_fetch_sources(){
|
_fetch_sources(){
|
||||||
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip
|
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip
|
||||||
if [ ! -d ~/.nano/ ]
|
mkdir -p ~/.nano/
|
||||||
then
|
|
||||||
mkdir ~/.nano/
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ~/.nano/ || exit
|
cd ~/.nano/ || exit
|
||||||
unzip -o "/tmp/nanorc.zip"
|
unzip -o "/tmp/nanorc.zip"
|
||||||
@ -21,11 +18,8 @@ _fetch_sources(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
_update_nanorc(){
|
_update_nanorc(){
|
||||||
if [ ! -f ~/.nanorc ]
|
touch ~/.nanorc
|
||||||
then
|
|
||||||
touch ~/.nanorc
|
|
||||||
fi
|
|
||||||
|
|
||||||
# add all includes from ~/.nano/nanorc if they're not already there
|
# add all includes from ~/.nano/nanorc if they're not already there
|
||||||
while read -r inc; do
|
while read -r inc; do
|
||||||
if ! grep -q "$inc" "${NANORC_FILE}"; then
|
if ! grep -q "$inc" "${NANORC_FILE}"; then
|
||||||
@ -42,10 +36,10 @@ NANORC_FILE=~/.nanorc
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-l|--lite)
|
-l|--lite)
|
||||||
UPDATE_LITE=1;;
|
UPDATE_LITE=1;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
echo "Install script for nanorc syntax highlights"
|
echo "Install script for nanorc syntax highlights"
|
||||||
echo "Call with -l or --lite to update .nanorc with secondary precedence to existing .nanorc includes"
|
echo "Call with -l or --lite to update .nanorc with secondary precedence to existing .nanorc includes"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user