Skip to content

Commit

Permalink
Add bootstrap_panther and use newly installed Ruby and tar
Browse files Browse the repository at this point in the history
`bootstrap_panther` installs newer ruby and tar
versions, which are necessary for `install` to
execute successfully.

Furthermore, `install` was changed to use Ruby
in /System/Library/Frameworks as well as the
environment's tar.
  • Loading branch information
larb0b committed May 14, 2020
1 parent b7ab625 commit 4a0487c
Showing 2 changed files with 58 additions and 2 deletions.
56 changes: 56 additions & 0 deletions bootstrap_panther
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/sh
set -eu

print() {
printf "\033[1;34m==>\033[30m $1\e[0m\n"
}

TAR_VERSION="1.15"
RUBY_VERSION="1.8.5-p115"

if [ "$(id -u)" -ne "0" ]; then
print "You must be root to run this script."
exit 1
fi

print "Installing tar..."
cd /tmp
curl -O ftp://ftp.gnu.org/gnu/tar/tar-"$TAR_VERSION".tar.gz
tar xzf tar-"$TAR_VERSION".tar.gz
cd tar-"$TAR_VERSION"
printf "diff -Naur tar-1.15/rmt/rmt.c tar-1.15-patched/rmt/rmt.c
--- tar-1.15/rmt/rmt.c Mon Sep 6 09:49:41 2004
+++ tar-1.15-patched/rmt/rmt.c Tue May 12 23:48:38 2020
@@ -32,6 +32,7 @@
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
#include \"system.h\"
+#include <locale.h>
#include <localedir.h>
#include <safe-read.h>
#include <full-write.h>
diff -Naur tar-1.15/src/tar.c tar-1.15-patched/src/tar.c
--- tar-1.15/src/tar.c Sat Dec 18 15:01:07 2004
+++ tar-1.15-patched/src/tar.c Tue May 12 23:49:06 2020
@@ -37,6 +37,7 @@
#include \"common.h\"
#include <getdate.h>
+#include <locale.h>
#include <localedir.h>
#include <rmt.h>
#include <prepargs.h>
" | patch -Np1 --ignore-whitespace -b
./configure --prefix=/usr/local
make
make install

cd /tmp
print "Installing ruby..."
curl -O http://cache.ruby-lang.org/pub/ruby/ruby-"$RUBY_VERSION".tar.gz
tar xzf ruby-"$RUBY_VERSION".tar.gz
cd ruby-"$RUBY_VERSION"
./configure --prefix=/usr
make
make DESTDIR=/System/Library/Frameworks/Ruby.framework/Versions/Current install
ln -s /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby /usr/local/bin/ruby
4 changes: 2 additions & 2 deletions install
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mistydemeo/tigerbrew/tarball/master anywhere you like or
# change the value of HOMEBREW_PREFIX.
@@ -207,7 +207,7 @@ Dir.chdir HOMEBREW_PREFIX do
else
# -m to stop tar erroring out if it can't modify the mtime for root owned directories
curl_flags = "fsSL"
system "/bin/bash -c '#{curl} -#{curl_flags} https://github.com/mistydemeo/tigerbrew/tarball/master | /usr/bin/tar xz -m --strip 1'"
system "/bin/bash -c '#{curl} -#{curl_flags} https://github.com/mistydemeo/tigerbrew/tarball/master | /usr/bin/env tar xz -m --strip 1'"
end
end

0 comments on commit 4a0487c

Please sign in to comment.