Files
BMLFS/build-scripts/which.build
2025-07-05 12:13:25 -05:00

47 lines
1.6 KiB
Bash

#! /bin/bash
# GNU Which
# Source: https://ftp.gnu.org/gnu/which/which-2.23.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: NONE
export PVER="2.23"
./configure --prefix=/usr $BUILDTRUPLE
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD install &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
which: which (shows the full path to shell commands)
which:
which: GNU 'which' takes one or more arguments. For each of its arguments it
which: prints to stdout the full path of the executables that would have been
which: executed when this argument had been entered at the shell prompt. It
which: does this by searching for an executable or script in the directories
which: listed in the environment variable PATH using the same algorithm as
which: bash(1). 'Which' is a built-in function in many shells.
which:
which: The GNU version of which was written by Carlo Wood.
which:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/which-$PVER-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*