File: download.sh

package info (click to toggle)
r-cran-freetypeharfbuzz 0.2.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: ansic: 370; sh: 74; makefile: 61
file content (18 lines) | stat: -rwxr-xr-x 286 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env sh

if [ -z $1 ]; then
    echo "No URL supplied"
    exit 1
fi
if [ -z $2 ]; then
    echo "No target file supplied"
    exit 1
fi

if [ -z ${R_HOME} ]; then
    R=R
else
    R="${R_HOME}/bin/R"
fi

echo "download.file('$1', '$2', mode = 'wb')" | ${R} --vanilla --slave