diff --git a/build/ublue-os-just/ublue-os-just.sh b/build/ublue-os-just/ublue-os-just.sh index c26c6591..9926125b 100755 --- a/build/ublue-os-just/ublue-os-just.sh +++ b/build/ublue-os-just/ublue-os-just.sh @@ -4,17 +4,18 @@ alias just="just --unstable" if [ ! -z "$HOME" ] && [ -d "$HOME" ] && [ ! -f "${HOME}/.justfile" ]; then cat > "${HOME}/.justfile" << EOF -!include /usr/share/ublue-os/justfile +!import /usr/share/ublue-os/justfile EOF fi if [ -f "${HOME}/.justfile" ]; then - if ! grep -Fxq '!include /usr/share/ublue-os/justfile' "${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\/just\/.*.just/d' "${HOME}/.justfile" + sed -i '\!import \/usr\/share\/ublue-os\/justfile/d' "${HOME}/.justfile" # 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 '!include /usr/share/ublue-os/justfile' | tee -a "${HOME}/.justfile" + echo '\!import /usr/share/ublue-os/justfile' | tee -a "${HOME}/.justfile" fi fi diff --git a/build/ublue-os-just/ublue-os-just.spec b/build/ublue-os-just/ublue-os-just.spec index 1078ec8d..f34df054 100644 --- a/build/ublue-os-just/ublue-os-just.spec +++ b/build/ublue-os-just/ublue-os-just.spec @@ -38,7 +38,7 @@ cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} # Create justfile which contains all .just files included in this package for justfile in %{buildroot}%{_datadir}/%{VENDOR}/%{sub_name}/*.just; do - echo "!include %{_datadir}/%{VENDOR}/%{sub_name}/$(basename ${justfile})" >> "%{buildroot}%{_datadir}/%{VENDOR}/justfile" + echo "!import %{_datadir}/%{VENDOR}/%{sub_name}/$(basename ${justfile})" >> "%{buildroot}%{_datadir}/%{VENDOR}/justfile" done # Add global "ujust" script to run just with --unstable