diff --git a/info.yml b/info.yml index 1d799e8..28ba431 100644 --- a/info.yml +++ b/info.yml @@ -1,7 +1,7 @@ name: nushell description: A new type of shell -version: 0.113.1 -revision: 2 +version: 0.114.1 +revision: 1 url: https://www.nushell.sh/ license: MIT maintainers: @@ -20,4 +20,4 @@ downloads: - url: https://github.com/nushell/nushell/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz extract_to: ${BPM_SOURCE} extract_strip_components: 1 - checksum: d2b514b9ec7c1cc5930025528987d730cadcaa0f063227691c837516093328fd + checksum: 48ef2fb6bb3ec2b1dcff87a792aeebdfab10b29f3119a62291075b17e4ad25d5 diff --git a/post_install.sh b/post_install.sh index 40f453a..dd825f3 100644 --- a/post_install.sh +++ b/post_install.sh @@ -1,8 +1,10 @@ -#!/bin/bash +#!/bin/sh -SHELL="nu" +SHELLS="/bin/nu /usr/bin/nu" -if ! grep "${SHELL}" "$BPM_ROOT"/etc/shells; then - echo "/bin/${SHELL}" | tee -a "$BPM_ROOT"/etc/shells - echo "/usr/bin/${SHELL}" | tee -a "$BPM_ROOT"/etc/shells -fi +for _shell in $SHELLS; do + if ! grep -q "^${_shell}\$" /etc/shells; then + echo "Adding '$_shell' to /etc/shells..." + echo "$_shell" | tee -a /etc/shells 1>/dev/null + fi +done diff --git a/post_remove.sh b/post_remove.sh index 22d948a..b4234c9 100644 --- a/post_remove.sh +++ b/post_remove.sh @@ -1,8 +1,10 @@ -#!/bin/bash +#!/bin/sh -SHELL="nu" +SHELLS="/bin/nu /usr/bin/nu" -if grep "${SHELL}" "$BPM_ROOT"/etc/shells; then - sed -i "\|/bin/${SHELL}|d" "$BPM_ROOT"/etc/shells - sed -i "\|/usr/bin/${SHELL}|d" "$BPM_ROOT"/etc/shells -fi +for _shell in $SHELLS; do + if grep -q "^${_shell}\$" /etc/shells; then + echo "Removing '$_shell' from /etc/shells..." + sed -i "\|^${_shell}\$|d" /etc/shells + fi +done diff --git a/post_update.sh b/post_update.sh new file mode 100644 index 0000000..dd825f3 --- /dev/null +++ b/post_update.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +SHELLS="/bin/nu /usr/bin/nu" + +for _shell in $SHELLS; do + if ! grep -q "^${_shell}\$" /etc/shells; then + echo "Adding '$_shell' to /etc/shells..." + echo "$_shell" | tee -a /etc/shells 1>/dev/null + fi +done diff --git a/recipe.sh b/recipe.sh index 542d836..b181d58 100644 --- a/recipe.sh +++ b/recipe.sh @@ -6,8 +6,12 @@ # This function is used for putting downloaded files to the correct location or applying patches prepare() { cd "$BPM_SOURCE" + + # https://github.com/nushell/nushell/issues/18578 + cargo update -v --precise 1.5.3 ethnum + # Fetch cargo dependencies - cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" + cargo fetch --locked --target host-tuple } # The build function is executed in the source directory