Skip to content

Commit

Permalink
Clone nanorc to ~/git instead of /dev (allowing persistent fixes; e.g…
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Jul 3, 2022
1 parent 61b542a commit 84b1e67
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
9 changes: 5 additions & 4 deletions Dockerfile-fedora
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ RUN /usr/local/sbin/add-uid-key vorburger "$(cat /tmp/vorburger.ch_keys /tmp/vor

USER vorburger
WORKDIR /home/vorburger/
RUN mkdir -p dev/vorburger-dotfiles-bin-etc
RUN mkdir -p dev/vorburger-dotfiles-bin-etc git/github.com/scopatz/

# This is slower than the rest, so do this first so that's cached and skipped when make other changes
RUN cd /home/vorburger/dev/ && git clone https://github.com/scopatz/nanorc.git && cd ..
COPY --chown=vorburger:vorburger install-nano.sh /home/vorburger/dev/vorburger-dotfiles-bin-etc/
RUN /home/vorburger/dev/vorburger-dotfiles-bin-etc/install-nano.sh
RUN cd /home/vorburger/git/github.com/scopatz/ && git clone https://github.com/scopatz/nanorc.git && cd
COPY --chown=vorburger:vorburger install-nano.sh /tmp/
RUN /tmp/install-nano.sh && rm /tmp/install-nano.sh

# TODO see TODO.MD: "clone" to ~/.git - how to COPY with .git ??)
# Do NOT do this, because then any time you touch any file during dev, it will redo above:
# COPY . /home/vorburger/dev/vorburger-dotfiles-bin-etc/
COPY --chown=vorburger:vorburger *.sh /home/vorburger/dev/vorburger-dotfiles-bin-etc/
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

- clone nanorc and dotfiles to ~/git/ instead of ~/dev/
- clone dotfiles to ~/git/ instead of ~/dev/ (but.. how? shouldn't git clone, because need local changes; must copy with .git)

- use podman generate kube / systemd

Expand Down
4 changes: 2 additions & 2 deletions all-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ go version
# https://github.com/apache/maven-mvnd/
mkdir -p $HOME/.m2/
[ -s $HOME/bin/mvnd ] || "$(dirname "$0")"/install-github.sh apache/maven-mvnd 0.8.0 maven-mvnd-0.8.0-linux-amd64 mvnd && \
mv /tmp/install-github/apache/maven-mvnd/mvnd-0.8.0-linux-amd64 /home/vorburger/bin/
# ln -s "$HOME/bin/$3/bin/$4" "$HOME/bin/$4"
mv /tmp/install-github/apache/maven-mvnd/mvnd-0.8.0-linux-amd64 /home/vorburger/bin/ && \
ln -s $HOME/bin/mvnd-0.8.0-linux-amd64/bin/mvnd $HOME/bin
[ -s $HOME/.m2/mvnd.properties ] || echo "java.home=/etc/alternatives/java_sdk/" >$HOME/.m2/mvnd.properties

# NB alias b="bazelisk " in dotfiles/alias
Expand Down
5 changes: 2 additions & 3 deletions dotfiles/.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# Beware that recent Nano v6.0 self built from source instead of installed from a package manager
# by default reads /usr/local/etc/nanorc instead of /etc/nanorc. (nano --rcfile ... overwrites it.)

# cd ~/dev/nanorc ; git clone https://github.com/scopatz/nanorc
include ~/dev/nanorc/*.nanorc
include ~/git/github.com/scopatz/nanorc/*.nanorc

# See fish/conf.d/TERM.fish for a note about colours in Nano.

Expand Down Expand Up @@ -50,7 +49,7 @@ bind ^O insert main
bind ^S savefile main
bind ^L gotoline main
bind ^L gotodir browser
bind ^P curpos main
# bind ^P curpos main
bind ^Q exit all
bind ^V paste all
bind ^W cancel all
Expand Down
6 changes: 5 additions & 1 deletion install-nano.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ NANO="$HOME/git/git.savannah.gnu.org/nano"
if ! [[ -e "$NANO" ]]; then
mkdir -p "$NANO"
git clone git://git.savannah.gnu.org/nano.git "$NANO"
else
cd $NANO
git pull
fi

cd "$NANO"
Expand All @@ -13,4 +16,5 @@ cd "$NANO"
make

mkdir -p ~/bin/
ln -s "$NANO"/src/nano ~/bin/
# cp instead of ln -s so that we have the latest in ~/bin in the container image even if ~/git is a volume with an older one
cp "$NANO"/src/nano ~/bin/

0 comments on commit 84b1e67

Please sign in to comment.