dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit c4a6dfe381546050e84b1a39a11c513d49f9c513
parent 0fa0647b96fbafe9a20147f5f6dacf6d860e8e34
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Wed,  3 Jan 2018 07:07:35 -0500

Change local scripts to Bourne-compatible

Diffstat:
M.local/bin/dviprint | 4++--
M.local/bin/my-open | 8++++----
M.local/bin/my-perms | 8++++----
M.local/bin/sncli-export | 2+-
4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/.local/bin/dviprint b/.local/bin/dviprint @@ -1,5 +1,5 @@ -#!/usr/bin/env bash -if [[ -n "$1" ]] +#!/bin/sh +if [ -n "$1" ] then dvips -o - $1 | lpr else diff --git a/.local/bin/my-open b/.local/bin/my-open @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # # ~/.local/bin/my-open @@ -10,13 +10,13 @@ # # Find handler, if one is available -if command -v cygstart > /dev/null 2>&1 +if which cygstart > /dev/null 2>&1 then handler=cygstart -elif command -v open > /dev/null 2>&1 +elif which open > /dev/null 2>&1 then handler=open -elif command -v exo-open > /dev/null 2>&1 +elif which exo-open > /dev/null 2>&1 then handler=exo-open else diff --git a/.local/bin/my-perms b/.local/bin/my-perms @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # ~/.local/bin/my-perms @@ -10,16 +10,16 @@ cd $HOME -for rec in $(ls -A) +for rec in `ls -A` do case $rec in .*) - if [[ -f "$rec" ]] + if [ -f "$rec" ] then chmod 600 $rec fi - if [[ -d "$rec" ]] + if [ -d "$rec" ] then chmod 700 $rec fi diff --git a/.local/bin/sncli-export b/.local/bin/sncli-export @@ -1,2 +1,2 @@ -#!/usr/bin/env bash +#!/bin/sh awk 'BEGIN{getline; getline}{print}' > ~/Downloads/$1