34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
src_root=$1
|
||
|
dst_root=$2
|
||
|
shift; shift;
|
||
|
|
||
|
target_instdir="$dst_root"
|
||
|
|
||
|
echo "Installing l10n stuff to the final location..."
|
||
|
|
||
|
for filelist in $@ ; do
|
||
|
test -f $filelist || continue;
|
||
|
echo -n " processing $filelist... "
|
||
|
# we wants to create even empty directories
|
||
|
for source_dir in `grep "^%dir" $filelist | sed "s|^%dir[[:blank:]]*||" | sort -ru` ; do
|
||
|
target_dir=`echo $source_dir | sed "s|$src_root|$dst_root|"`
|
||
|
mkdir -p "$DESTDIR$target_dir"
|
||
|
done
|
||
|
# install files
|
||
|
for source_file in `grep -v "^%dir" $filelist | sort -ru` ; do
|
||
|
target_file=`echo $source_file | sed "s|$src_root|$dst_root|"`
|
||
|
cp "$source_file" "$DESTDIR$target_file"
|
||
|
done
|
||
|
# update the file list and install it
|
||
|
filelist_name=$(basename $filelist)
|
||
|
sed "s|$src_root|$dst_root|" $filelist >$filelist_name
|
||
|
# we need the file list installed to create compat symlinks in %post
|
||
|
# FIXME: We should fix LO to find the files in /usr/share directly
|
||
|
cp $filelist_name $DESTDIR$dst_root/
|
||
|
echo "$dst_root/$filelist_name" >>$filelist_name
|
||
|
|
||
|
echo "done"
|
||
|
done
|