You are not logged in.

#1 2011-03-29 17:51:33

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Pacget errors

I've attempted to use the pacget code from the wiki, but seem to be having some difficulty with it.  Does anyone know how to correct this?

/usr/bin/pacget: line 17: $'[\302\240!': command not found
/usr/bin/pacget: line 37: syntax error near unexpected token `then'
/usr/bin/pacget: line 37: `if ! [[ $filename = *.db || $repo = "custom" ]]; then'

Here are the offending lines of code from /usr/bin/pacget:

(line 14-20)

ARIA2=$(which aria2c 2> /dev/null)

# ----- do some checks first -----
if [ ! -x "$ARIA2" ]; then
  error "aria2c was not found or isn't executable."
  exit 1
fi

(line 34-43)

# For db files, or when using a custom repo (which most likely doesn't have any mirror),
# use only the URL passed by pacman; Otherwise, extract the list of servers (from the include file of the repo) to download from
url=$1
if ! [[ $filename = *.db || $repo = "custom" ]]; then
  mirrorlist=$(awk -F' *= *' '$0~"^\\["r"\\]",/Include *= */{l=$2} END{print l}' r=$repo /etc/pacman.conf)
  if [ -n mirrorlist ]; then
    num_conn=$(grep ^split $CONF | cut -d'=' -f2)
    url=$(sed -r '/^Server *= */!d; s/Server *= *//; s/\$repo'"/$repo/; s:$:/$filename:" $mirrorlist | head -n $(($num_conn * 2)))
  fi
fi

Last edited by the sad clown (2011-03-29 23:56:17)


I laugh, yet the joke is on me

Offline

#2 2011-03-29 21:51:27

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: Pacget errors

nvm, it was the same thing as the wiki.  Still working on this problem.

Last edited by the sad clown (2011-03-29 23:50:06)


I laugh, yet the joke is on me

Offline

#3 2011-03-30 16:55:55

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: Pacget errors

Does anyone have this script working properly?


I laugh, yet the joke is on me

Offline

Board footer

Powered by FluxBB