Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parted emerge issue #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions splat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PATH="${PATH}:/usr/local/bin"
get_pkg() {
# do nothing if no arguments given
for pkg in $*; do
if [ X`which ${pkg} 2>/dev/null` == X ]; then
if [ X`which $(basename ${pkg}) 2>/dev/null` == X ]; then
# we need to install ${pkg}
if [ X`which pacman 2>/dev/null` != X ]; then
# install the Arch way
Expand All @@ -60,7 +60,7 @@ When prompted, just hit [ENTER] or type 'Y' and hit

EOF
# perform the install
pacman -S "${pkg}"
pacman -S "$(basename ${pkg})"
else
# install the gentoo/chromeos way
if [ X`which emerge 2>/dev/null` == X ]; then
Expand Down Expand Up @@ -140,7 +140,12 @@ set -e
###
# make sure the needed tools are present
###
get_pkg wget parted
if [ X`which pacman 2>/dev/null` == X ]
then
get_pkg net-misc/wget sys-block/parted
else
get_pkg wget parted
fi

# download the ArchLinuxARM tarball and MD5 files
for f in "${TARBALL}" "${TARBALL}.md5"; do
Expand Down