mirror of
https://github.com/scopatz/nanorc.git
synced 2024-10-18 02:06:40 -07:00
commit
6f24a8fca3
1 changed files with 9 additions and 4 deletions
13
install.sh
13
install.sh
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip
|
||||
if [ ! -d ~/.nano/ ]
|
||||
then
|
||||
|
|
@ -16,7 +18,10 @@ then
|
|||
touch ~/.nanorc
|
||||
fi
|
||||
|
||||
cat ~/.nano/nanorc >> ~/.nanorc
|
||||
sort -u ~/.nanorc > /tmp/nanorc2
|
||||
cat /tmp/nanorc2 > ~/.nanorc
|
||||
rm /tmp/nanorc2
|
||||
# add all includes from ~/.nano/nanorc if they're not already there
|
||||
NANORC_FILE=~/.nanorc
|
||||
while read inc; do
|
||||
if ! grep -q "$inc" "${NANORC_FILE}"; then
|
||||
echo "$inc" >> $NANORC_FILE
|
||||
fi
|
||||
done < ~/.nano/nanorc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue