From c2c7d34973a97c3efb76cf91cce81ffffe131985 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 28 Mar 2014 15:12:03 +0100 Subject: Discover a POSIX shell for Solaris Under Solaris, use ksh instead of `/bin/sh`. This uses `$SHELL` as a POSIX shell, coupled with a `configure` check that sets it correctly. Note that the POSIX shell might end up being bash, so this actually introduces more fragmentation than it reduces. Taken from https://github.com/freedreno/mesa/blob/master/configure.ac --- bin/mkrc | 88 ---------------------------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100755 bin/mkrc (limited to 'bin/mkrc') diff --git a/bin/mkrc b/bin/mkrc deleted file mode 100755 index 3d9b749..0000000 --- a/bin/mkrc +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh - -: ${RCM_LIB:=$(dirname "$0")/../share/rcm} -. "$RCM_LIB/rcm.sh" - -destination() { - local dotfiles_dir="$1" - local dotless=$2 - local in_host=$3 - local tag="$4" - - if [ "x$tag" != "x" ]; then - echo "$dotfiles_dir/tag-$tag" - elif [ $in_host = 1 ]; then - echo "$dotfiles_dir/host-$HOSTNAME" - else - echo "$dotfiles_dir" - fi -} - -show_help() { - local exit_code=${1:-0} - - $PRINT "Usage: mkrc [-hvqo] [-t TAG] [-d DIR] FILES ..." - $PRINT "see mkrc(1) and rcm(5) for more details" - - exit $exit_code -} - -if [ $# -eq 0 ]; then - show_help 1 -fi - -for DOTFILES_DIR in $DOTFILES_DIRS $DEFAULT_DOTFILES_DIR; do - break -done - -tag= -verbosity=0 -in_host=0 -version=0 -always_copy=0 -force_symlink=0 - -while getopts ChSsVvqot:d: opt; do - case "$opt" in - C) always_copy=1 ;; - h) show_help ;; - t) tag="$OPTARG" ;; - v) verbosity=$(($verbosity + 1)) ;; - q) verbosity=$(($verbosity - 1)) ;; - o) in_host=1 ;; - d) DOTFILES_DIR="$OPTARG" ;; - V) version=1 ;; - S) force_symlink=1 ;; - s) force_symlink=0 ;; - esac -done -shift $(($OPTIND-1)) - -handle_common_flags mkrc $version $verbosity - -if [ $in_host -eq 1 -a "x$tag" != "x" ]; then - $ERROR 1 "Cannot specify both -o and -t" -fi - -if [ $always_copy -eq 1 ]; then - INSTALL="$INSTALL -C" -fi - -files=$@ - -if [ $force_symlink -eq 1 ]; then - for file in $files; do - dedotted="$(de_dot "$file")" - INSTALL="$INSTALL -S $dedotted" - done -fi - -for file in $files; do - dotless="$(de_dot "$file")" - dest="$(destination "$DOTFILES_DIR" "$dotless" $in_host "$tag")" - mkdir -p "$dest/$(dirname "$dotless")" - $PRINT "Moving..." - mv_v "$file" "$dest/$dotless" - $PRINT "Linking..." - $INSTALL -d "$DOTFILES_DIR" -t "${tag:--}" "$dotless" -done -- cgit v1.2.3