From 2f85abf4623747670ceb851facf549b7a2bf57cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 15 Oct 2011 10:27:15 +0300 Subject: [PATCH] install-completions: Remove, no longer needed. --- install-completions | 75 --------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100755 install-completions diff --git a/install-completions b/install-completions deleted file mode 100755 index 6d5d197f..00000000 --- a/install-completions +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# install relevant completions, by sourcing every scriptlet -# found in a given directory, and symlinking those matching -# an installed command to another directory - -have() -{ - PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null -} - -usage() -{ - echo "usage: $0 [installation_dir]" -} - -while getopts ":h" flag; do - case $flag in - h) usage; exit 0;; - esac -done - -shift $((OPTIND - 1)) - -completion_dir=$1 -if [ -z "$completion_dir" ]; then - echo "missing completion directory" - usage - exit 1 -fi -if [ ! -d $completion_dir ]; then - echo "invalid directory $completion_dir" - usage - exit 1 -fi - -installation_dir=$2 -if [ ! -d $installation_dir ]; then - echo "invalid directory $installation_dir" - usage - exit 1 -fi - -# many scripts require this -shopt -s extglob - -# and some require this also -UNAME=$(uname -s) -UNAME=${UNAME/CYGWIN_*/Cygwin} - -case $UNAME in - Linux|GNU|GNU/*) USERLAND=GNU ;; - *) USERLAND=$UNAME ;; -esac - -for script in $completion_dir/*; do - # reset completion - complete -r - - # source script - source $script 2>/dev/null - - # check completion output - output=$(complete -p) - - if [ -z "$output" ]; then - continue - fi - - if [ -n "$installation_dir" ]; then - ln -sf $script $installation_dir/$(basename $script) - else - echo "$script OK" - fi - -done