mirror of
https://github.com/YellowJacketLinux/lfs-rpmify.git
synced 2025-01-23 14:32:11 +08:00
which
This commit is contained in:
parent
7538ff2a31
commit
c7694d623e
48
20-which.sh
Normal file
48
20-which.sh
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "`whoami`" == "root" ]; then
|
||||||
|
echo "Danger, Will Robinson!"
|
||||||
|
echo "Do not execute me as r00t"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TARBALL="which-2.21.tar.gz"
|
||||||
|
DNL="https://ftp.gnu.org/gnu/which/which-2.21.tar.gz"
|
||||||
|
SHA256="f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad"
|
||||||
|
|
||||||
|
[ -d which-2.21 ] && rm -rf which-2.21
|
||||||
|
|
||||||
|
if [ ! -f ${TARBALL} ]; then
|
||||||
|
wget ${DNL}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Could not retrieve ${DNL}"
|
||||||
|
echo "Sorry."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `"
|
||||||
|
if [ "${CHECK}" != "${SHA256}" ]; then
|
||||||
|
echo "${TARBALL} does not match expected SHA256. Sorry."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar -zxf ${TARBALL} && cd which-2.21
|
||||||
|
|
||||||
|
./configure --prefix=/usr
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Configure script failed for which. Sorry."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
make
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed building which. Sorry."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "As the root user, run:"
|
||||||
|
echo
|
||||||
|
echo " cd which-2.21"
|
||||||
|
echo " make install"
|
||||||
|
echo
|
11
README.md
11
README.md
@ -185,3 +185,14 @@ Requires CMake to build.
|
|||||||
* Script: [`19-brotli.sh`](19-brotli.sh)
|
* Script: [`19-brotli.sh`](19-brotli.sh)
|
||||||
* Status: Script Untested
|
* Status: Script Untested
|
||||||
* Note: Python bindings NOT built
|
* Note: Python bindings NOT built
|
||||||
|
|
||||||
|
Dependency Twenty: which
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Justification: Needed for libseccomp test suite, and by *many* test suites and
|
||||||
|
scripts on a GNU/Linux system. No build dependencies outside of LFS.
|
||||||
|
|
||||||
|
* Script: [`20-which.sh`](20-which.sh)
|
||||||
|
* Stutus: Script Untested
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user