forked from haskell/haskell-platform
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
hptool/os-extras/posix/installer/install-haskell-platform.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
# | ||
# This is the Haskell Platform installer script for Posix systems. | ||
# | ||
# It expects a tar archive named "hp-usr-local.tar.gz" to be present | ||
# in the current working directory. | ||
# | ||
# It will unpack the archive at / and run the activate-hs script. | ||
# | ||
# This script needs be run as root. | ||
|
||
usr_local_tar="./hp-usr-local.tar.gz" | ||
|
||
if ! test -f ""$usr_local_tar""; then | ||
echo Archive $usr_local_tar not found. | ||
exit 1 | ||
fi | ||
|
||
if ! test -w /; then | ||
echo "The directory / is not writable. Please run this script as root." | ||
exit 1 | ||
fi | ||
|
||
echo "Unpacking $usr_local_tar to /..." | ||
if ! tar -C / -xf "$usr_local_tar"; then | ||
echo "Unpack failed - aborting installation." | ||
exit 1 | ||
fi | ||
|
||
echo "Running /usr/local/bin/activate-hs ..." | ||
/usr/local/bin/activate-hs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters