about summary refs log tree commit diff stats
path: root/home-manager/packages/scripts/deprecated/java_compiler
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-04-03 18:45:02 +0200
committerene <ene@sils.li>2023-04-03 18:45:02 +0200
commit4dea0028b638b4e3a4c4002ddf8d00e639b142e3 (patch)
tree61e41b94427ff95290df55769b5c91be7bb9f887 /home-manager/packages/scripts/deprecated/java_compiler
parentFix(hm/packages/scripts): Add update script (diff)
downloadnixos-config-4dea0028b638b4e3a4c4002ddf8d00e639b142e3.tar.gz
nixos-config-4dea0028b638b4e3a4c4002ddf8d00e639b142e3.zip
Fix(hm/packages/scripts): Remove deprecated scripts
Diffstat (limited to '')
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/clpa15
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/fmt16
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/jc34
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/jj58
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/lib41
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/new37
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/no-pack/jc-no-pack22
-rwxr-xr-xhome-manager/packages/scripts/deprecated/java_compiler/no-pack/jj-no-pack57
8 files changed, 0 insertions, 280 deletions
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/clpa b/home-manager/packages/scripts/deprecated/java_compiler/clpa
deleted file mode 100755
index 0c8ba47a..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/clpa
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-pw=$(pwd)
-[ "$n" = "n" ] || cd ..
-noColor=yes . ./lib
-
-unset CLASSPATH
-
-while IFS= read -r i;do
-    export CLASSPATH=$CLASSPATH$i:
-done < "$(tmp cat "$(tmp "find $(pwd)/libs | sed 1d") $(tmp "find $(pwd)/scr | sed 1d")")"
-cd $pw
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/fmt b/home-manager/packages/scripts/deprecated/java_compiler/fmt
deleted file mode 100755
index 7bfe920b..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/fmt
+++ /dev/null
@@ -1,16 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. %SHELL_LIBRARY_PATH
-
-cd ..;
-pw=$(pwd);
-cd ..;
-
-while IFS= read -r i;do
-    java -jar google-java-format-1.15.0-all-deps.jar -i $i
-done < "$(tmp "find $pw/scr | sed 1d")"
-
-
-
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/jc b/home-manager/packages/scripts/deprecated/java_compiler/jc
deleted file mode 100755
index d1c867d4..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/jc
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2086
-
-cd ..
-noColor=yes . ./lib
-
-export CLASSPATH=
-scr=$(mktemp)
-
-while IFS= read -r a;do
-    export CLASSPATH=$CLASSPATH$a:
-done < "$(tmp "find libs/ | sed 1d")"
-
-while IFS= read -r a;do
-    echo "$a" >> $scr
-done < "$(tmp "find scr/ | sed 1d")"
-
-n=n . ./clpa 
-
-#while IFS= read -r a;do
-#    rm "$a"
-#done < "$(tmp "find target/ | sed 1d")"
-
-javac -d target/ $(cat $scr | tr '\n' ' ')
-if [ "$1" = "r" ];then
-    cd target || die "bug"
-    java Main
-    cd ..
-else
-    ./jj target/ libs/
-fi
-
-rm $scr
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/jj b/home-manager/packages/scripts/deprecated/java_compiler/jj
deleted file mode 100755
index 3f3254ba..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/jj
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2086
-noColor=yes . ./lib
-
-help() {
-cat << EOF 
-Add all dirs with trailing /
-
-\$1 = java .class files dir
-\$2 = java .jar files dir
-
-if you want to update libs delete this:
-$wd/libs.cache
-
-EOF
-exit 0
-}
-
-
-class=$(mktemp)
-jar=$(mktemp)
-pwd=$(pwd)
-
-mkdir "$pwd"/out/cache 2> /dev/null
-wd="$pwd"/out/cache
-[ "$1" = "-h" ] && help 
-[ "$1" = "--help" ] && help 
-
-[ -z "$1" ] && error "no args" && help && exit 1
-[ -z "$2" ] && error "no args" && help && exit 1
-
-while IFS= read -r i;do
-    cp "$i" $wd/"$(basename $i)"
-done < "$(tmp "find $1 | sed 1d" )"
-
-while IFS= read -r i;do
-    if ! grep "^$i$" "$wd"/libs.cache;then
-        echo "$i" | sed "s|$2||" >> "$wd"/libs.cache
-        cd $wd
-        jar -xf "$pwd"/"$i"
-        cd $pwd
-    fi
-done < "$(tmp "find $2 | sed 1d" )"
-
-while IFS= read -r a;do
-    echo "$a" | sed "s|$wd/||" >> $jar
-done < "$(tmp "find $wd | sed 1d")"
-
-
-
-cd "$wd" || die "No $wd"
-jar -c -f myJar.jar -e Main $(cat $jar | tr '\n' ' ') 
-
-mv myJar.jar "$pwd"/out/myJar.jar
-
-rm $jar
-rm $class
-if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/lib b/home-manager/packages/scripts/deprecated/java_compiler/lib
deleted file mode 100755
index cf3e0203..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/lib
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2059,SC2066
-
-
-
-out() { printf "$1 $2\n" "$(out2 "$@")"; }
-out2() { shift 2; for i in "$*";do printf "$i";done; }
-
-
-if [ "$noColor" = "yes" ];then
-error() {  >&2 out "==> ERROR:" "$*"; } >&2
-warning() {  >&2 out "==> WARNING:" "$*"; } >&2
-msg() { out "==>" "$*"; }
-msg2() { out " ->" "$*"; }
-
-readp() { printf "..> $1"; read -r "$2"; }
-
-else
-error() {  >&2 out "\033[1;91m==> ERROR:\033[0m" "\033[1;93m$*\033[0m"; } >&2
-warning() {  >&2 out "\033[1;91m==> WARNING:\033[0m" "\033[1;93m$*\033[0m"; } >&2
-msg() { out "\033[1;96m==>\033[0m" "\033[1;93m$*\033[0m"; }
-msg2() { out "\033[1;96m ->\033[0m" "\033[1;93m$*\033[0m"; }
-
-readp() { printf "\033[1;96m..>\033[0m \033[1;93m$1\033[0m"; read -r "$2"; }
-fi
-
-
-
-
-
-dien() { error "$@" "failed"; exit 1; }
-die() { error "$@"; exit 1; }
-
-clean() { awk '{if (NF) {if (!/^#/) {if (!/^[[:blank:]]*#/) {print $0}}}}' "$1"; }
-# shellcheck disable=SC2294
-tmp() { 
-    [ -d /tmp/LIB_FILE_TEMP_DIR/ ] || mkdir /tmp/LIB_FILE_TEMP_DIR/
-    tmp=$(mktemp -p /tmp/LIB_FILE_TEMP_DIR/);
-    eval "$@" 1> "$tmp";
-    echo "$tmp"; 
-}
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/new b/home-manager/packages/scripts/deprecated/java_compiler/new
deleted file mode 100755
index 22f871f5..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/new
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2086
-# shellcheck source=/dev/null
-. ./lib
-
-
-[ -z "$1" ] && die "Requires name"
-mkdir "$1"
-pw="$1"
-
-ln -sr jc ./$pw/jc
-ln -sr jj ./$pw/jj
-ln -sr clpa ./$pw/clpa
-ln -sr lib ./$pw/lib
-ln -sr fmt ./$pw/fmt
-
-cd $pw
-mkdir libs
-mkdir -p out/cache
-mkdir scr
-mkdir target
-
-cat > scr/Main.java << EOL 
-public class Main {
-    public static void main(String[] args) {
-        System.out.println("Hello, world!");
-    }
-}
-EOL
-cat > .gitignore << EOL
-/target
-.gitignore
-/out
-EOL
-git init > /dev/null
-[ -d /tmp/LIB_FILE_TEMP_DIR/ ] && rm -r /tmp/LIB_FILE_TEMP_DIR/
-exit 0
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/no-pack/jc-no-pack b/home-manager/packages/scripts/deprecated/java_compiler/no-pack/jc-no-pack
deleted file mode 100755
index 0cd9864e..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/no-pack/jc-no-pack
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2086
-
-. ./lib
-cd ..
-
-export CLASSPATH=
-scr=$(mktemp)
-
-while IFS= read -r a;do
-    export CLASSPATH=$CLASSPATH$a:
-done < "$(tmp "find libs/ | sed 1d")"
-
-while IFS= read -r a;do
-    echo "$a" >> $scr
-done < "$(tmp "find scr/ | sed 1d")"
-
-javac -d target/ $(cat $scr | tr '\n' ' ')
-../jj target/ libs/
-[ "$1" = "r" ] && java -jar out/myJar.jar
-
-rm $scr
diff --git a/home-manager/packages/scripts/deprecated/java_compiler/no-pack/jj-no-pack b/home-manager/packages/scripts/deprecated/java_compiler/no-pack/jj-no-pack
deleted file mode 100755
index d476ce52..00000000
--- a/home-manager/packages/scripts/deprecated/java_compiler/no-pack/jj-no-pack
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /usr/bin/env dash
-# shellcheck disable=SC2086
-. ./lib
-
-help() {
-cat << EOF 
-Add all dirs with trailing /
-
-\$1 = java .class files dir
-\$2 = java .jar files dir
-
-if you want to update libs delete this:
-"$wd"/libs.cache
-
-EOF
-exit 0
-}
-
-
-class=$(mktemp)
-jar=$(mktemp)
-pwd=$(pwd)
-
-mkdir "$pwd"/out/cache 2> /dev/null
-wd="$pwd"/out/cache
-[ "$1" = "-h" ] && help 
-[ "$1" = "--help" ] && help 
-
-[ -z "$1" ] && echo "no args" && help && exit 1
-[ -z "$2" ] && echo "no args" && help && exit 1
-
-while IFS= read -r i;do
-    cp "$i" $wd/"$(basename $i)"
-done < "$(tmp "find $1 | sed 1d" )"
-
-while IFS= read -r i;do
-    if ! grep "^$i$" "$wd"/libs.cache;then
-        echo "$i" | sed "s|$2||" >> "$wd"/libs.cache
-        cd $wd
-        jar -xf "$pwd"/"$i"
-        cd $pwd
-    fi
-done < "$(tmp "find $2 | sed 1d" )"
-
-while IFS= read -r a;do
-    echo "$a" | sed "s|$wd/||" >> $jar
-done < "$(tmp "find $wd | sed 1d")"
-
-
-
-cd "$wd" || die "No $wd"
-jar -c -f myJar.jar -e Main $(cat $jar | tr '\n' ' ') 
-
-mv myJar.jar "$pwd"/out/myJar.jar
-
-rm $jar
-rm $class