Add slides-bin/java and slides shell function

This commit is contained in:
Sage Vaillancourt 2024-01-22 22:49:41 -05:00
parent b1252955d6
commit 20c81522e4
2 changed files with 22 additions and 0 deletions

View File

@ -8,6 +8,14 @@ else
alias pacman="sudo pacman"
fi
alias _slides="$(which slides)"
function slides() {
OLD_PATH="$PATH"
PATH="$HOME/.slides-bin:$PATH"
_slides $@
PATH="$OLD_PATH"
}
function integrate {
local from="$(realpath $1)"
if [[ "$from" == "$f"* ]]; then

14
fake_home/.slides-bin/java Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# Sometime around Java 23 or 24 this should all be stabilized
if [[ "$JAVA_21" == "" ]]; then
echo '$JAVA_21 not defined!'
exit 1
fi
cp "$1" "/tmp/java.java" || exit 1
"$JAVA_21/bin/java" --source 21 --enable-preview "/tmp/java.java"
rm "/tmp/java.java"