Skip to content

Instantly share code, notes, and snippets.

@mitjafelicijan
Created January 15, 2018 20:21
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save mitjafelicijan/77648500a9024fe58216a6835d5ebf8b to your computer and use it in GitHub Desktop.
Save mitjafelicijan/77648500a9024fe58216a6835d5ebf8b to your computer and use it in GitHub Desktop.
Creates portable version of Redis (Linux)
#!/bin/sh
# http://download.redis.io/releases/
# Usage: sh compile-redis-portable.sh
VERSION="4.0.6"
INIT_PATH=`dirname "$0"`
INIT_PATH=`( cd "$INIT_PATH" && pwd )`
ARCHS=`uname -m`
case "$ARCHS" in
i?86) ARCHS=i386 ;;
x86_64) ARCHS="x86_64" ;;
ppc64) ARCHS="ppc64" ;;
esac
cd /tmp
wget -O redis-$VERSION.tar.gz "http://download.redis.io/releases/redis-$VERSION.tar.gz"
tar xzf redis-$VERSION.tar.gz
cd redis-$VERSION
make
mkdir redis-portable-$VERSION-$ARCHS
find src/ -perm /a+x -exec cp {} redis-portable-$VERSION-$ARCHS/ \;
tar cvfz redis-portable-$VERSION-$ARCHS.tar.gz redis-portable-$VERSION-$ARCHS/
mv redis-portable-$VERSION-$ARCHS.tar.gz $INIT_PATH
md5sum $INIT_PATH/redis-portable-$VERSION-$ARCHS.tar.gz > $INIT_PATH/redis-portable-$VERSION-$ARCHS.tar.gz.md5
rm -rf redis-$VERSION*
@jsapparts
Copy link

Exactly what I need. Ty 👍

@cppxaxa
Copy link

cppxaxa commented Oct 1, 2019

Thanks a lot for the script !

@cppxaxa
Copy link

cppxaxa commented Oct 1, 2019

Thanks a lot for the script !

Compiled one in ubuntu: https://github.com/cppxaxa/redis-portable-linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment