Skip to content

Commit

Permalink
nvim image support ; generic gdrive backup
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhomer authored Dec 9, 2023
1 parent bfadcf9 commit 013000c
Show file tree
Hide file tree
Showing 24 changed files with 818 additions and 557 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/[email protected]
- name:
run: |
echo $SHELL
sudo apt-get install stow
rm ~/.bashrc
rm ~/.bash_profile
Expand Down
10 changes: 9 additions & 1 deletion bin/backup-me
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,19 @@ args="$args --log-file=$LOG"
# args="$args --dry-run"
log:: "rsync args : $args"

LOCATIONS=".dotfiles gdrive .local/share/buku"
LOCATIONS=".dotfiles .local/share/buku"
PROJECT_ROOTS="things dotmodules my try"
for root in $PROJECT_ROOTS ; do
LOCATIONS="$LOCATIONS projects/$root"
done
GDRIVE_LOCATIONS=$(
find $HOME -maxdepth 1 -type d \( -name 'gdrive' -o -name 'gdrive-*' \) \
-exec basename {} \;
)
for gdrive in $GDRIVE_LOCATIONS ; do
echo "Found gdrive : $gdrive"
LOCATIONS="$LOCATIONS $gdrive"
done
echo $DEFAULT_PROJECT_ROOTS
for location in $LOCATIONS ; do
LOCATION="$HOME/$location"
Expand Down
1 change: 1 addition & 0 deletions bin/dotme
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ command_inner() {
if is-dotme-full ; then
[ $DRY -eq 0 ] && is-pc && dotme-pip
[ $DRY -eq 0 ] && is-pc && dotme-gem
[ $DRY -eq 0 ] && is-pc && dotme-lua
fi
[ $DRY -eq 0 ] && clean-vim
[ $DRY -eq 0 ] && dotme-vim
Expand Down
2 changes: 1 addition & 1 deletion bin/dotme-gem
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ should-run $0 || exit 0

$(shim) && cd ${ME} && . bin/i.sh
if ! command -v rbenv ; then
log::warn "rbenv not installed"
log::info "rbenv not installed"
exit
fi

Expand Down
2 changes: 1 addition & 1 deletion bin/dotme-gitme
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ should-run -m 7 $@ $0 || exit 0

$(shim) && cd ${ME} && . bin/i.sh
if ! command -v fasd ; then
log::warn "fasd not installed"
log::info "fasd not installed"
exit
fi

Expand Down
19 changes: 19 additions & 0 deletions bin/dotme-lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

#
# Install lua packages
#

should-run $0 || exit 0

if ! command -v luarocks ; then
log::info "luarocks not installed"
exit
fi


luarocks --lua-version 5.1 --local install magick

should-run -fu $0


2 changes: 1 addition & 1 deletion bin/dotme-node
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $(shim) && cd ${ME} && . bin/i.sh
[ ! -d ~/.nvm ] && mkdir ~/.nvm

if ! command -v node ; then
log::warn "node not installed"
log::info "node not installed"
exit
fi

Expand Down
2 changes: 1 addition & 1 deletion bin/dotme-pip
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should-run -m 30 $0 $REQUIREMENTS || exit 0
$(shim) && cd ${ME} && . bin/i.sh

if ! command -v pip3 ; then
log::warn "pip3 not installed"
log::info "pip3 not installed"
exit
fi

Expand Down
2 changes: 1 addition & 1 deletion bin/dotme-rust
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(shim) && cd ${ME} && . bin/i.sh
log:: "configuring rust"

if ! command -v rustup-init ; then
log::warn "rustup-init not installed"
log::info "rustup-init not installed"
exit
fi

Expand Down
10 changes: 10 additions & 0 deletions bin/dotme-start
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ if ! command -v bash > /dev/null 2>&1; then
fi
fi

if ! command -v bash > /dev/null 2>&1; then
if command -v apk > /dev/null 2>&1; then
echo "bash not installed, installing with apk"
apk add bash
else
echo "bash not installed"
exit
fi
fi

if [[ "$OSTYPE" =~ ^linux-android ]]; then
echo "Removing default termux properties since this is dotfiles managed"
if [[ -f ~/.termux/termux.properties ]] ; then
Expand Down
2 changes: 1 addition & 1 deletion bin/dotme-test
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should-run -m 7 $@ $0 || exit 0
$(shim) && cd ${ME} && . bin/i.sh

if ! command -v node ; then
log::warn "pnpm not installed"
log::info "pnpm not installed"
exit
fi

Expand Down
6 changes: 6 additions & 0 deletions bin/git-remote-to-ssh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@

startingDirectory=($PWD)
$(shim) && cd ${ME} && . bin/i.sh && cd $startingDirectory
if [[ ! -d .git ]] ; then
log:: OK "Not a git directory, no remote URL to change"
exit 0
fi
remoteUrl=`git config --get remote.origin.url`



if [[ "$remoteUrl" != *ianhomer/dotfiles* ]] ; then
log:: NOK "${remoteUrl} not supported for conversion"
exit 1
Expand Down
4 changes: 3 additions & 1 deletion config/brew/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ brew "jq"
brew "k9s"
brew "libpq"
brew "lua-language-server"
brew "[email protected]"
brew "luarocks"
brew "maven"
brew "neofetch"
brew "node"
Expand Down Expand Up @@ -172,4 +174,4 @@ cask "visual-studio-code"
brew "catimg"
brew "eye-d3"
# brew "ffmpeg", args: ["with-libvpx"]
# brew "imagemagick", args: ["with-webp"]
brew "imagemagick"
Loading

0 comments on commit 013000c

Please sign in to comment.