「|」の前でゲットしたシェルスクリプトを、「|」の後のbashに送って実行します。
ひとこと
- 「|」がまさに「パイプ」=「管」
- 「-s」はサイレントの意
ちなみに...
https://laravel.build/laravel-sail-appの中身はこんな感じ
これ(シェルスクリプト)が取得されて、実行されます
docker info > /dev/null 2>&1
# Ensure that Docker is running...
if [ $? -ne 0 ]; then
echo "Docker is not running."
exit 1
fi
docker run --rm \
-v "$(pwd)":/opt \
-w /opt \
laravelsail/php81-composer:latest \
bash -c "laravel new laravel-sail-app && cd laravel-sail-app && php ./artisan sail:install --with=mysql,redis,meilisearch,mailhog,selenium "
cd laravel-sail-app
./vendor/bin/sail pull mysql redis meilisearch mailhog selenium
./vendor/bin/sail build
CYAN='\033[0;36m'
LIGHT_CYAN='\033[1;36m'
WHITE='\033[1;37m'
NC='\033[0m'
echo ""
if sudo -n true 2>/dev/null; then
sudo chown -R $USER: .
echo -e "${WHITE}Get started with:${NC} cd laravel-sail-app && ./vendor/bin/sail up"
else
echo -e "${WHITE}Please provide your password so we can make some final adjustments to your application's permissions.${NC}"
echo ""
sudo chown -R $USER: .
echo ""
echo -e "${WHITE}Thank you! We hope you build something incredible. Dive in with:${NC} cd laravel-sail-app && ./vendor/bin/sail up"
fi
cf.

curl ~~ | sudo bash の bashの意味 | teratail
(http
alt.
% curl -s https://laravel.build/laravel-sail-app | bash


コメント