Skip to content

Commit

Permalink
Merge pull request #16 from timschwab/redis-installs
Browse files Browse the repository at this point in the history
Redis installs
  • Loading branch information
Tim Schwab authored May 20, 2019
2 parents 58d8809 + 2faf5b6 commit 59cda19
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# custom

scripts/redis-installed
scripts/redis-stable.tar.gz
scripts/redis-stable/*



Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cheatsheet",
"version": "1.1.3",
"version": "1.2.0",
"description": "A knowledge base for short snippets",
"main": "app.js",
"scripts": {
Expand Down
16 changes: 16 additions & 0 deletions scripts/install-redis-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# https://redis.io/topics/quickstart
# This is the way to install on Linux, apparently...

# Download tarball
# Extract source
# Make
# Run Redis Server

wget http://download.redis.io/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable
make
cd src
./redis-server &
4 changes: 4 additions & 0 deletions scripts/install-redis-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

brew install redis
brew services start redis
9 changes: 5 additions & 4 deletions scripts/post-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ const {exec} = require('child_process')

switch (process.platform) {
case 'win32':
// Windows
// TODO: Move the logic for installing on windows here from the bat file
exec('call scripts/install-redis-windows.bat')
break
case 'darwin':
console.log(
'Automated install of Redis currently not implemented on Mac OS'
)
// Mac
exec('sh scripts/install-redis-mac.sh')
break
case 'linux':
console.log('Automated install of Redis currently not implemented on Linux')
// ... Linux
exec('sh scripts/install-redis-linux.sh')
break
}

0 comments on commit 59cda19

Please sign in to comment.