From 705c0dffb9a2179d1f6563caaa4fd086d413b01c Mon Sep 17 00:00:00 2001 From: Kristiyan Georgiev <2003kristiyan@gmail.com> Date: Thu, 16 Jan 2025 10:29:50 +0100 Subject: [PATCH] fix: separate just and ujust --- .../etc-profile.d/ublue-os-just.sh | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/build/ublue-os-just/etc-profile.d/ublue-os-just.sh b/build/ublue-os-just/etc-profile.d/ublue-os-just.sh index 16f80ea0..9a76f08a 100755 --- a/build/ublue-os-just/etc-profile.d/ublue-os-just.sh +++ b/build/ublue-os-just/etc-profile.d/ublue-os-just.sh @@ -1,19 +1,17 @@ -# Add uBlue's justfiles to users with home directories which lack a justfile. +# Add a custom justfile to users with home directories which lack a justfile. if [ ! -z "$HOME" ] && [ -d "$HOME" ] && [ ! -f "${HOME}/.justfile" ]; then cat > "${HOME}/.justfile" << EOF -import "/usr/share/ublue-os/justfile" -EOF -fi +# You can add your own commands here! +# These commands are separate from the ujust commands. +# Learn more about just at https://github.com/casey/just -if [ -f "${HOME}/.justfile" ]; then - if ! grep -Fxq 'import "/usr/share/ublue-os/justfile"' "${HOME}/.justfile"; then - # Remove any lines we may have added previously. - sed -i '/!include \/usr\/share\/ublue-os\/just\/.*.just/d' "${HOME}/.justfile" - sed -i '/!include \/usr\/share\/ublue-os\/justfile/d' "${HOME}/.justfile" +# Choose +_default: + just --choose - # Point to the new main justfile, place it as the first line - echo '# You can add your own commands here! For documentation, see: https://ublue.it/guide/just/' | tee -a "${HOME}/.justfile" - echo 'import "/usr/share/ublue-os/justfile"' | tee -a "${HOME}/.justfile" - fi +# Edit the justfile +edit: + just -e +EOF fi