Skip to content

Commit

Permalink
rfct Makesurefile
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Mar 17, 2024
1 parent 5c53016 commit 4e6a492
Showing 1 changed file with 25 additions and 47 deletions.
72 changes: 25 additions & 47 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@
@depends_on fhtagn @args 'bwk'

@goal tested_mawk133 @private
@depends_on installed_mawk133
@depends_on fhtagn @args 'mawk133'
@depends_on installed_mawk @args '1.3.3' 'mawk-1.3.3-20090920.tgz'
@depends_on fhtagn @args 'mawk1.3.3'

@goal tested_mawk134 @private
@depends_on installed_mawk134
@depends_on fhtagn @args 'mawk134'
@depends_on installed_mawk @args '1.3.4' 'mawk-1.3.4-20200120.tgz'
@depends_on fhtagn @args 'mawk1.3.4'

@goal tested_all_gawks
@doc 'tests with all Gawk-s'
Expand Down Expand Up @@ -270,37 +270,34 @@
./bwk --version
rm -r awk-master

@lib mawk
install_mawk() {
local version="$1"
local tgz="$2"

local exeName="mawk${version//./}"

echo
echo "Fetching Mawk $version..."
echo
@goal installed_mawk @params VERSION TGZ @private
@reached_if [[ -f "soft/mawk$VERSION" ]]
@depends_on soft_folder_created
@use_lib dl
echo
echo "Fetching Mawk $VERSION..."
echo

cd "soft"
cd "soft"

wget "https://invisible-island.net/archives/mawk/$tgz"
tar xzvf "$tgz"
rm "$tgz"
download "https://invisible-island.net/archives/mawk/$TGZ" "$TGZ"
tar xzvf "$TGZ"
rm "$TGZ"

echo
echo "Compile Mawk $version..."
echo
echo
echo "Compile Mawk $VERSION..."
echo

cd mawk-"$version"-*
cd mawk-"$VERSION"-*

./configure && make
./configure && make

mv mawk ../$exeName
exeName="mawk$VERSION"
mv mawk ../$exeName

cd ..
./$exeName -W version
rm -r mawk-"$version"-*
}
cd ..
./$exeName -W version
rm -r mawk-"$VERSION"-*

@goal installed_gawk @params VERSION EXE_NAME @private
@reached_if [[ -f soft/"$EXE_NAME" ]]
Expand Down Expand Up @@ -347,25 +344,6 @@
./$EXE_NAME --version
rm -r "$dlFolder"

@goal installed_mawk133 @private
@reached_if [[ -f soft/mawk133 ]]
@depends_on soft_folder_created
@use_lib mawk
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
install_mawk 1.3.3 'mawk-1.3.3-20080909.tgz' # this one doesn't compile on macos
elif [[ "$OSTYPE" == "darwin"* ]]; then
install_mawk 1.3.3 'mawk-1.3.3-20090920.tgz'
else
>&2 echo "Unknown OS"
exit 1
fi

@goal installed_mawk134 @private
@reached_if [[ -f soft/mawk134 ]]
@depends_on soft_folder_created
@use_lib mawk
install_mawk 1.3.4 'mawk-1.3.4-20200120.tgz'

@goal installed_busybox @private
@reached_if [[ -x ./soft/busybox ]]
@use_lib dl
Expand Down

0 comments on commit 4e6a492

Please sign in to comment.