summaryrefslogtreecommitdiffstats
path: root/cron-jobs/genpkglist
blob: 0b5d76fc5d1c4aea51e0db3b02a6cd2c7a67cc3b (plain)
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
#!/bin/bash

if [ $# -ne 2 ]; then
	echo "usage: $(basename $0) <reponame> <arch>"
	exit 1
fi

reponame=$1
arch=$2

##### Arch specific stuff. TODO make this configurable #####
ftppath="/home/ftp/$reponame/os/$arch/"
############################################################

if [ ! -d "$ftppath" ]; then
    echo "FTP path '$ftppath' does not exist"
    exit 1
fi

if [ ! -f /etc/makepkg.conf ]; then
    echo "/etc/makepkg.conf not found! Aborting"
    exit 1
fi

. /etc/makepkg.conf

cd "$ftppath"
ls -1 *$PKGEXT