Revert "modified install shell to install to xdg-config-dirs to comply with xdg standards"

This reverts commit 6b4617fcd1.
This commit is contained in:
andrew 2023-10-06 12:08:21 +08:00
parent 6b4617fcd1
commit 5e8edb961e
1 changed files with 7 additions and 8 deletions

View File

@ -6,12 +6,11 @@ if [ ! "$(command -v unzip)" ]; then
exit 1
fi
_fetch_sources(){
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip
mkdir -p ~/.config/nano/
mkdir -p ~/.nano/
cd ~/.config/nano/ || exit
cd ~/.nano/ || exit
unzip -o "/tmp/nanorc.zip"
mv nanorc-master/* ./
rm -rf nanorc-master
@ -19,21 +18,21 @@ _fetch_sources(){
}
_update_nanorc(){
touch ~/.config/nano/nanorc
touch ~/.nanorc
# add all includes from ~/.config/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
if ! grep -q "$inc" "${NANORC_FILE}"; then
echo "$inc" >> "$NANORC_FILE"
fi
done < ~/.config/nano/nanorc
done < ~/.nano/nanorc
}
_update_nanorc_lite(){
sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.conig.\/nano\/*.nanorc"' "${NANORC_FILE}"
sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.nano\/*.nanorc"' "${NANORC_FILE}"
}
NANORC_FILE=~/.config\/nano\/nanorc
NANORC_FILE=~/.nanorc
case "$1" in
-l|--lite)