#!/usr/bin/env bash

DATE=$(date --iso-8601 | sed 's/-/./g')

sed -i "s/^pkgver=.*$/pkgver=0.13.0_$DATE/" 'rust-nightly-bin/PKGBUILD'
sed -i "s/^pkgver=.*$/pkgver=0.0.1_$DATE/" 'cargo-nightly-bin/PKGBUILD'

unset DATE

cd 'rust-nightly-bin'
makepkg --noconfirm -s -r -L -i
cd '../cargo-nightly-bin'
makepkg --noconfirm -s -r -L -i

Revert removal of rust update script.
Revert removal of rust update script.

This reverts parts of commit 3e618e3085a15e6be17b91d0537fc6c42748e20a.
