Skip to content

Commit

Permalink
Update program download script
Browse files Browse the repository at this point in the history
  • Loading branch information
danenbm committed Oct 24, 2024
1 parent 8f31075 commit bd82d28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion configs/scripts/program/dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RPC_DEVNET="https://api.devnet.solana.com"

if [ -z "$OUTPUT" ]; then
echo "missing output directory"
cd ${CURRENT_DIR}
exit 1
fi

Expand All @@ -41,17 +42,20 @@ copy_from_chain() {
"bin")
solana account -u "$RPC" "$ACCOUNT_ID" -o ${OUTPUT}/$4$3 > /dev/null || {
echo $(RED "[ ERROR ] Failed to dump program '$ACCOUNT_ID'")
cd ${CURRENT_DIR}
exit 1
}
;;
"so")
solana program dump -u "$RPC" "$ACCOUNT_ID" ${OUTPUT}/$4$3 > /dev/null|| {
solana program dump -u "$RPC" "$ACCOUNT_ID" ${OUTPUT}/$4$3 > /dev/null || {
echo $(RED "[ ERROR ] Failed to dump program '$ACCOUNT_ID'")
cd ${CURRENT_DIR}
exit 1
}
;;
*)
echo $(RED "[ ERROR ] unknown account type for '$3'")
cd ${CURRENT_DIR}
exit 1
;;
esac
Expand Down

0 comments on commit bd82d28

Please sign in to comment.