mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-25 17:21:57 -07:00
ci: cleanup
This cleans up our CI scripts but doesn't significantly change anything. Mostly this is removing dead code and wrong comments, and making the style a bit more consistent.
This commit is contained in:
29
ci/utils.sh
29
ci/utils.sh
@@ -1,6 +1,6 @@
|
||||
mktempd() {
|
||||
echo $(mktemp -d 2>/dev/null || mktemp -d -t tmp)
|
||||
}
|
||||
#!/bin/bash
|
||||
|
||||
# Various utility functions used through CI.
|
||||
|
||||
host() {
|
||||
case "$TRAVIS_OS_NAME" in
|
||||
@@ -15,9 +15,6 @@ host() {
|
||||
|
||||
gcc_prefix() {
|
||||
case "$TARGET" in
|
||||
aarch64-unknown-linux-gnu)
|
||||
echo aarch64-linux-gnu-
|
||||
;;
|
||||
arm*-gnueabihf)
|
||||
echo arm-linux-gnueabihf-
|
||||
;;
|
||||
@@ -27,19 +24,8 @@ gcc_prefix() {
|
||||
esac
|
||||
}
|
||||
|
||||
dobin() {
|
||||
[ -z $MAKE_DEB ] && die 'dobin: $MAKE_DEB not set'
|
||||
[ $# -lt 1 ] && die "dobin: at least one argument needed"
|
||||
|
||||
local f prefix=$(gcc_prefix)
|
||||
for f in "$@"; do
|
||||
install -m0755 $f $dtd/debian/usr/bin/
|
||||
${prefix}strip -s $dtd/debian/usr/bin/$(basename $f)
|
||||
done
|
||||
}
|
||||
|
||||
architecture() {
|
||||
case ${TARGET:?} in
|
||||
case "$TARGET" in
|
||||
x86_64-*)
|
||||
echo amd64
|
||||
;;
|
||||
@@ -56,9 +42,8 @@ architecture() {
|
||||
}
|
||||
|
||||
is_ssse3_target() {
|
||||
case "${TARGET}" in
|
||||
i686-unknown-netbsd) return 1 ;; # i686-unknown-netbsd - SSE2
|
||||
i686*|x86_64*) return 0 ;;
|
||||
case "$TARGET" in
|
||||
x86_64*) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
return 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user