"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/cli/atom.sh" (8 Mar 2017, 482 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 # Get current path in Windows format
    3 if command -v "cygpath" > /dev/null; then
    4   # We have cygpath to do the conversion
    5   ATOMCMD=$(cygpath "$(dirname "$0")/atom.cmd" -a -w)
    6 else
    7   # We don't have cygpath so try pwd -W
    8   pushd "$(dirname "$0")" > /dev/null
    9   ATOMCMD="$(pwd -W)/atom.cmd"
   10   popd > /dev/null
   11 fi
   12 if [ "$(uname -o)" == "Msys" ]; then
   13   cmd.exe //C "$ATOMCMD" "$@" # Msys thinks /C is a Windows path...
   14 else
   15   cmd.exe /C "$ATOMCMD" "$@" # Cygwin does not
   16 fi