1
#!/bin/bash
2
3
# Configs
4
source ./config/messages
5
. config/colors
6
7
# Variables
8
CURRENTDIR=$(pwd)
9
ARCHITECTURE=`echo $1`   
10
11
12
if [ -z "${ARCHITECTURE}" ] ; then
13
	error "you need to specify an architecture:\ni686\nx86_64"
14
	exit 1
15
fi
16
17
# Create TempDir and move into it
18
echo " "
19
echo -e "$_r >$_W Updating overlay packages ... $_n"
20
mkdir -p ${CURRENTDIR}/profiles/chakra-netbook-testing-$ARCHITECTURE/rootoverlay/opt/chakra/pkgs &>/dev/null
21
echo -e -n "$_r >$_W Creating temporary directories ... $_n"
22
rm -rf temp &>/dev/null
23
mkdir temp &>/dev/null
24
echo -e "$_g done $_n"
25
26
# Get pkgs
27
echo -e -n "$_r >$_W Getting packages ... $_n"
28
pushd ${CURRENTDIR}/temp &>/dev/null
29
wget ftp://mirror.selfnet.de/archlinux/core/os/$ARCHITECTURE/initscripts-* &>/dev/null
30
wget ftp://mirror.selfnet.de/archlinux/extra/os/$ARCHITECTURE/nvidia* &>/dev/null
31
wget ftp://mirror.selfnet.de/kdemod/chakra/$ARCHITECTURE/catalyst* &>/dev/null
32
#wget ftp://mirror.selfnet.de/archlinux/extra/os/$ARCHITECTURE/xf86-video-nouveau* &>/dev/null
33
#wget ftp://mirror.selfnet.de/archlinux/extra/os/$ARCHITECTURE/nouveau-drm* &>/dev/null
34
popd &>/dev/null
35
echo -e "$_g done $_n"
36
37
# Remove old stuff
38
echo -e -n "$_r >$_W Removing old packages ... $_n"
39
rm -rf ${CURRENTDIR}/profiles/chakra-netbook-testing-$ARCHITECTURE/rootoverlay/opt/chakra/pkgs/*.pkg* &>/dev/null
40
echo -e "$_g done $_n"
41
42
# Move downloaded packages into overlay
43
echo -e -n "$_r >$_W Moving new packages into overlay ... $_n"
44
mv ${CURRENTDIR}/temp/*.pkg* ${CURRENTDIR}/profiles/chakra-netbook-testing-$ARCHITECTURE/rootoverlay/opt/chakra/pkgs/ &>/dev/null
45
echo -e "$_g done $_n"
46
47
# clean up
48
echo -e -n "$_r >$_W Cleaning up ... $_n"
49
rm -rf temp &>/dev/null
50
echo -e "$_g done $_n"
51
52
# show packages
53
echo -e "$_r >$_W List of fetched packages: $_n"
54
echo " "
55
ls -1 ${CURRENTDIR}/profiles/chakra-netbook-testing-$ARCHITECTURE/rootoverlay/opt/chakra/pkgs/
56
57
echo " "
58
echo -e "$_g >$_W All done ! $_n"
59
echo " "