mirror of
https://github.com/pyenv/pyenv.git
synced 2026-10-02 23:41:06 +09:00
--- Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
45 lines
549 B
Bash
Executable File
45 lines
549 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
aria2c=
|
|
wget=
|
|
src=
|
|
dest=
|
|
dir_=
|
|
|
|
case "$1" in
|
|
aria2c)
|
|
aria2c=1;;
|
|
wget)
|
|
wget=1;;
|
|
esac
|
|
while (($#)); do
|
|
case "$1" in
|
|
-o)
|
|
if [[ -z $wget ]]; then
|
|
dest="$2"
|
|
shift
|
|
fi
|
|
;;
|
|
-O)
|
|
if [[ -n $wget ]]; then
|
|
dest="$2"
|
|
shift
|
|
fi
|
|
;;
|
|
-d)
|
|
if [[ -n $aria2c ]]; then
|
|
dir_="$2/"
|
|
shift
|
|
fi
|
|
;;
|
|
-*)
|
|
;;
|
|
*)
|
|
src="$FIXTURE_ROOT/${1##*/}"
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
cp "$src" "${dir_}${dest}"
|
|
|