xtendo-org / chips

A fast, lightweight, and concurrent plugin manager for the fish shell, written in Haskell
73 stars 3 forks source link

Let's support more platforms #30

Open simnalamburt opened 7 years ago

simnalamburt commented 7 years ago

Chips is awesome! I want to spread this program to various platforms.

For POSIX platforms

#!/bin/bash
# Requirements: libgmp git stack strip upx zip
export TARGET="x86_64-linux" && \
  git clone https://github.com/xtendo-org/chips.git --depth=1 --branch=1.1.2 && \
  cd chips && \
  stack setup && \
  stack build && \
  cp .stack-work/install/"$TARGET"/nightly-2016-10-29/8.0.1/bin/chips chips-"$TARGET" && \
  strip --strip-all --remove-section=.comment --remove-section=.note chips-"$TARGET" && \
  upx -9 --lzma chips-"$TARGET" && \
  zip chips-"$TARGET".zip chips-"$TARGET" && \
  rm chips-"$TARGET"

For macOS

#!/bin/bash
# Requirements: libgmp git stack strip upx zip
export TARGET="x86_64-osx" && \
  git clone https://github.com/xtendo-org/chips.git --depth=1 --branch=1.1.2 && \
  cd chips && \
  stack setup && \
  stack build && \
  cp .stack-work/install/"$TARGET"/nightly-2016-10-29/8.0.1/bin/chips chips-"$TARGET" && \
  strip -u -r chips-"$TARGET" && \
  upx -9 --lzma chips-"$TARGET" && \
  zip chips-"$TARGET".zip chips-"$TARGET" && \
  rm chips-"$TARGET"

TODOs

xtendo-org commented 7 years ago

Supporting Windows would require major code rewrite, as chips uses RawFilePath which is POSIX-only.