mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-25 17:51:10 +00:00
Linux check for Linux script
These changes are mostly just to mirror the macOS packaging script.
This commit is contained in:
parent
d420d878c5
commit
baccfe544b
@ -8,6 +8,13 @@ set -e
|
||||
# If you’re in the VM, you can run it using the ‘package-exa’ command.
|
||||
|
||||
|
||||
# Linux check!
|
||||
uname=`uname -s`
|
||||
if [[ "$uname" != "Linux" ]]; then
|
||||
echo "Gotta be on Linux to run this (detected '$uname')!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# First, we need to get the version number to figure out what to call the zip.
|
||||
# We do this by getting the first line from the Cargo.toml that matches
|
||||
# /version/, removing its whitespace, and building a command out of it, so the
|
||||
@ -17,7 +24,7 @@ toml_file="/vagrant/Cargo.toml"
|
||||
eval exa_$(grep version $toml_file | head -n 1 | sed "s/ //g")
|
||||
if [ -z "$exa_version" ]; then
|
||||
echo "Failed to parse version number! Can't build exa!"
|
||||
exit
|
||||
exit 1
|
||||
else
|
||||
echo "Building exa v$exa_version"
|
||||
fi
|
||||
@ -40,7 +47,7 @@ strip -v "$exa_linux_binary"
|
||||
|
||||
# Compress the binary for upload. The ‘-j’ flag is necessary to avoid the
|
||||
# /vagrant path being in the zip too. Only the zip gets the version number, so
|
||||
# the binaries can have consistent names, but it’s still possible to tell
|
||||
# the binaries can have consistent names, and it’s still possible to tell
|
||||
# different *downloads* apart.
|
||||
echo -e "\n\033[4mZipping binary...\033[0m"
|
||||
exa_linux_zip="/vagrant/exa-linux-x86_64-${exa_version}.zip"
|
||||
|
Loading…
Reference in New Issue
Block a user