Update relative script directory.
This commit is contained in:
parent
3742bed6fe
commit
d6b9426197
1 changed files with 9 additions and 6 deletions
|
@ -19,10 +19,12 @@ refresh=$4
|
||||||
# List of the packages to use.
|
# List of the packages to use.
|
||||||
packages="${@:5}"
|
packages="${@:5}"
|
||||||
|
|
||||||
|
script_dir=$(dirname $0)
|
||||||
|
|
||||||
if [ ! $cache_hit ] || [ $refresh ]; then
|
if [ ! $cache_hit ] || [ $refresh ]; then
|
||||||
./install_and_cache_pkgs.sh ~/cache-apt-pkgs $packages
|
$script_dir/install_and_cache_pkgs.sh ~/cache-apt-pkgs $packages
|
||||||
else
|
else
|
||||||
./restore_pkgs.sh ~/cache-apt-pkgs $cache_restore_root
|
$script_dir/restore_pkgs.sh ~/cache-apt-pkgs $cache_restore_root
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
@ -33,9 +35,10 @@ for package in $packages; do
|
||||||
echo "- $item"
|
echo "- $item"
|
||||||
manifest=$manifest$item,
|
manifest=$manifest$item,
|
||||||
done
|
done
|
||||||
# Remove trailing comma.
|
echo "done."
|
||||||
manifest=${manifest:0:-1}
|
|
||||||
|
|
||||||
manifest_filepath="$cache_dir/manifest.log"
|
manifest_filepath="$cache_dir/manifest.log"
|
||||||
echo $manifest > $manifest_filepath
|
echo -n "Writing manifest to $manifest_filepath..."
|
||||||
echo "Manifest written to $manifest_filepath"
|
# Remove trailing comma.
|
||||||
|
echo ${manifest:0:-1} > $manifest_filepath
|
||||||
|
echo "done."
|
Loading…
Reference in a new issue