File: test.sh

package info (click to toggle)
vim-rainbow 3.3.1.88.g76ca1a2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 212 kB
  • sloc: sh: 43; ruby: 13; ansic: 9; perl: 8; php: 8; xml: 5; javascript: 3; makefile: 2; haskell: 2
file content (52 lines) | stat: -rw-r--r-- 816 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
typoo
(typoo)

if stuff
then
    somestuff
    test = (())
    (())
    a = (1 + (2 + 3))
    if
    then
    elif
    then
    else
    fi
else
    otherstuff
fi

if stuff
    then
    somestuff
    else
    otherstuff
fi

function f() {
    if
    fi
}


# check if command exists
command_exists () {
  type "${1}"  > /dev/null 2>&1;
  a = (1 + (2 + 3))
}

# Fetch the update
fetch() {
  if type wget > /dev/null 2>&1 ; then
    $debug && echo "fetching update via wget"
    wget --no-check-certificate -O "${2}" "${1}" >/dev/null 2>&1
  elif type curl > /dev/null 2>&1 ; then
    $debug && echo "fetching update via curl"
    curl --insecure --remote-name -o "${2}" "${1}" >/dev/null 2>&1
  else
    echo 'Warning: Neither wget nor curl is available. online updates unavailable' >&2
    exit 1
  fi
}