mirror of
https://github.com/scopatz/nanorc
synced 2024-11-23 19:00:27 +01:00
defining functions with the keyword is not supported in all shells
This commit is contained in:
parent
59441c7f5a
commit
9467b1ea5a
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
function _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/ ]
|
if [ ! -d ~/.nano/ ]
|
||||||
then
|
then
|
||||||
|
@ -15,7 +15,7 @@ function _fetch_sources() {
|
||||||
rm /tmp/nanorc.zip
|
rm /tmp/nanorc.zip
|
||||||
}
|
}
|
||||||
|
|
||||||
function _update_nanorc() {
|
_update_nanorc(){
|
||||||
if [ ! -f ~/.nanorc ]
|
if [ ! -f ~/.nanorc ]
|
||||||
then
|
then
|
||||||
touch ~/.nanorc
|
touch ~/.nanorc
|
||||||
|
@ -29,7 +29,7 @@ function _update_nanorc() {
|
||||||
done < ~/.nano/nanorc
|
done < ~/.nano/nanorc
|
||||||
}
|
}
|
||||||
|
|
||||||
function _update_nanorc_lite() {
|
_update_nanorc_lite(){
|
||||||
sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.nano\/*.nanorc"' "${NANORC_FILE}"
|
sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.nano\/*.nanorc"' "${NANORC_FILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user