Git Product home page Git Product logo

pump-up-the-volume's Introduction

Pump Up the Volume

A generic shell script for creating an automagically mountable case sensitive volume in OSX.
Sourced originally from a former colleague, but I've adapted this solution for a wider range of practical install scenarios.

Why would I want to do this?

Primarily to resolve this conflict:

  1. OSX uses case-insensitive volumes (and actually warns you not to use case-sensitive volumes for system files.) Production systems almost always use case-sensitive file systems (think Linux). Shuffling your code between these environments creates the possibility of a filename collision.
  2. TimeMachine insists that you be consistent for all your disks, and choose one type of case sensitivity. As OSX recommends case-sensitive volumes, it makes sense to stick with this. Unfortunately this is at odds with condition 1.

Pump-Up-The-Volume allows you to create a TimeMachine-friendly development volume that will be compatible with your prod environment. It will act as a transparent case-sensitive folder, and TimeMachine will archive the sparsebundle allowing you to roll back if you need to.

Configuration:

You'll need to set a couple of important environment variables:

  1. WORKSPACE -- The location of the raw image file that will contain the case-sensitive file system.
  2. MOUNTPOINT -- The location where the image file will be mounted.
  3. VOLUME_NAME -- The name of the volume itself (how OSX will present it.)
  4. VOLUME_SIZE -- The size of the volume.
  5. AUTOMOUNT -- The location to install the automount script that will be executed on system start. (A script to mount and unmount the volume will be installed at this location.)

Note: Use sudo -E to ensure the variables are passed to the sudo environment.

Usage Example:

    export WORKSPACE="/Volumes/Projects/.workspace.sparseimage"
    export MOUNTPOINT="${HOME}/workspace"
    export VOLUME_NAME="workspace"
    export VOLUME_SIZE="10g"
    export AUTOMOUNT="${HOME}/bin"
    sudo -E ./inflate.sh install

Everyday Use:

Your volume will now be attached each time you boot up your machine.
If you find you need to occasionally unmount the volume, a unpump.sh script will be installed at the AUTOMOUNT location to facilitate this use case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.