【then echo】の検索結果
$0, スクリプト書いててたま~に使うかな…?
if [ -z "$1" ]; then
echo "$0: 引数が足りひんで"
exit 1
fi
今回の視聴者プレゼント: がばがば更新スクリプト
#!/bin/bash
if [ -z "$1" ]; then
echo "$0: the argument not enough"
exit 1
else
printf "Updating to %s:\n" $1
fi
curl -fsSL https://get.pnpm.io/install.sh | sh -
cd ~/work/misskey/
git fetch \
&& git checkout $1 \
&& git submodule update --init \
&& NODE_ENV=production pnpm install --frozen-lockfile \
&& NODE_ENV=production pnpm run build \
&& pnpm run migrate