Skip to content

Commit

Permalink
Fix bug in fetchdist script in packager.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrcad committed Jul 17, 2022
1 parent fd3880a commit 6117439
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions xt_base/packages/util/fetchdist
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ get()
exit 1
fi

echo Fetching $program-$osname >&2
echo Fetching $program-$ostok >&2
case $osname in
Darwin*)
if [ ! -d $outdir/$osname ]; then
mkdir $outdir/$osname
if [ ! -d $outdir/$ostok ]; then
mkdir $outdir/$ostok
fi
host=$($utildir/exported host $osname)
host=$($utildir/exported host $ostok)
if [ -z "$host" ]; then
echo "Unknown distribution name $osname"
echo "Unknown distribution name $ostok"
else
if [ -z "$arch" ]; then
arch=x86_64
Expand All @@ -81,28 +81,24 @@ get()
fi
;;
Linux*)
if [ ! -d $outdir/$osname ]; then
mkdir $outdir/$osname
if [ ! -d $outdir/$ostok ]; then
mkdir $outdir/$ostok
fi
if [ -z "$arch" ]; then
arch=x86_64
fi
host=$($utildir/exported host $osname)
host=$($utildir/exported host $ostok)

if [ -z "$host" ]; then
echo "Unknown distribution name $osname"
echo "Unknown distribution name $ostok"
else
sfx=$($utildir/exported sfx $osname)
sfx=$($utildir/exported sfx $ostok)
fname="xictools_$program-$osname-$version-$arch.$sfx"
odir=$outdir/$ostok
if [ $arch = x86_64 ]; then
dir=$USER@$host:/home/$USER/src/xt/xt_base/packages/pkgfiles
odir=$outdir/$osname
else
dir=$USER@$host:/home/$USER/src/xt-32/xt_base/packages/pkgfiles
odir=$outdir/$osname.$arch
fi
if [ ! -d $odir ]; then
mkdir $odir
fi
rsync $dir/$fname $odir/$fname
chmod 0644 $odir/$fname
Expand Down

0 comments on commit 6117439

Please sign in to comment.